• 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
Fwd: 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]

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

References: 
 >How a Controller in MainMenu.xib can send actions to a document object (From: Louis Demers <email@hidden>)

  • Prev by Date: Re: Quick Look help needed [SOLVED]
  • Next by Date: Extending URL Loading System - NSURLResponse
  • Previous by thread: How a Controller in MainMenu.xib can send actions to a document object
  • Next by thread: Re: How a Controller in MainMenu.xib can send actions to a document object
  • Index(es):
    • Date
    • Thread