• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How a Controller in MainMenu.xib can send actions to a document object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How a Controller in MainMenu.xib can send actions to a document object


  • Subject: How a Controller in MainMenu.xib can send actions to a document object
  • From: Louis Demers <email@hidden>
  • Date: Thu, 09 Oct 2008 22:24:22 -0400

I'm working on a Document Based app

My app has in its MainMenu.xib a controller that monitors a usb devices. I want this controller to send actions to the front most document. I tried many thing in the archives, including

1) in my controller in the MainMenu.xib

[[NSApplication sharedApplication] sendAction:@selector(usbEvent:) to: (id)nil from:nil]; // From nil because this is just a c procedure

but nothing happens.

2) in my controller in the MainMenu.xib

[[NSDocumentController sharedDocumentController] currentDocument];

but that always return null


That must be a really frequent occurrence with an easy cocoaish way to do it.



any advise ? Thanks in adavance.




Louis Demers eng. www.obzerv.com


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How a Controller in MainMenu.xib can send actions to a document object
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Re: Quick Look help needed
  • Next by Date: Re: Quick Look help needed [SOLVED]
  • Previous by thread: Re: Quick Look help needed [SOLVED]
  • Next by thread: Fwd: How a Controller in MainMenu.xib can send actions to a document object
  • Index(es):
    • Date
    • Thread