Re: Capture "Space" key event
Re: Capture "Space" key event
- Subject: Re: Capture "Space" key event
- From: Matt Jaffa <email@hidden>
- Date: Fri, 5 Mar 2004 08:20:39 -0700
Allan,
In my Program I tried making my window it a subclass of NSWindow
And using that keyDown:(NSEvent*)anEvent
to get the delete key so I can delete a row from my NSTableView,
but it is not working, in fact the keyDown is not getting any events
at all.
Is there something I am missing?
MAtt
On Mar 5, 2004, at 8:05 AM, Allan Odgaard wrote:
On 5. Mar 2004, at 14:53, Mathew Peterson wrote:
My guess was to sub class NSApplication, but of course events don't
get passed down the chain.
From the NSApplication documentation, so I would think your guess is
correct:
- (void)sendEvent:(NSEvent *)anEvent
Dispatches anEvent to other objects. You rarely invoke sendEvent:
directly, although you might want to override this method to perform
some action on every event. sendEvent: messages are sent from the main
event loop (the run method). sendEvent: is the method that dispatches
events to the appropriate respondersNSApp handles application events,
the NSWindow indicated in the event record handles window-related
events, and mouse and key events are forwarded to the appropriate
NSWindow for further dispatching.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.