Re: [newbie] access the controller for the current window
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