• 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
Re: [newbie] access the controller for the current window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [newbie] access the controller for the current window


  • Subject: Re: [newbie] access the controller for the current window
  • From: Nick Zitzmann <email@hidden>
  • Date: Wed, 17 Aug 2005 16:57:29 -0600


On Aug 17, 2005, at 4:40 PM, Barry McClure wrote:

I subclassed NSTableView to capture keydown events.
The method that i want fired when a certain key is
pressed is in the controller class for application. It
doesn't fire the method.

someController (in the following code) is nil.  What
have I done wrong?

You are calling the method that returns the window's window controller. Unless you specifically created the window using a subclass of NSWindowController, then the result you're seeing isn't too surprising. Is your application controller the delegate of NSApplication? If so, then you can call [NSApp delegate] to get a pointer to the application controller.


Nick Zitzmann
<http://www.chronosnet.com/>


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: [newbie] access the controller for the current window
      • From: Barry McClure <email@hidden>
References: 
 >[newbie] access the controller for the current window (From: Barry McClure <email@hidden>)

  • Prev by Date: [newbie] access the controller for the current window
  • Next by Date: Re: [newbie] access the controller for the current window
  • Previous by thread: [newbie] access the controller for the current window
  • Next by thread: Re: [newbie] access the controller for the current window
  • Index(es):
    • Date
    • Thread