Fwd: How a Controller in MainMenu.xib can send actions to a document object
Fwd: How a Controller in MainMenu.xib can send actions to a document object
- Subject: Fwd: How a Controller in MainMenu.xib can send actions to a document object
- From: "Kyle Sluder" <email@hidden>
- Date: Thu, 9 Oct 2008 23:47:53 -0400
On Thu, Oct 9, 2008 at 10:24 PM, Louis Demers <email@hidden> wrote:
> [[NSApplication sharedApplication] sendAction:@selector(usbEvent:)
> to:(id)nil from:nil]; // From nil because this is just a c procedure
Don't do this. It's using the responder chain; what if your
document's window isn't key?
> [[NSDocumentController sharedDocumentController] currentDocument];
>
> but that always return null
Then you have a problem with the document framework.
--Kyle Sluder
_______________________________________________
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