Re: handling events within NSWindow
Re: handling events within NSWindow
- Subject: Re: handling events within NSWindow
- From: Dustin Voss <email@hidden>
- Date: Sun, 15 Oct 2006 23:15:26 -0700
On 14 Oct 2006, at 2:36 PM, Alex Reynolds wrote:
I am giving up trying to customize WebView and instead trying to
handle events in the NSWindow that contains my WebView.
I have created a subclass of the NSWindow containing my WebView and
added:
- (void) sendEvent: (NSEvent *) theEvent
{
NSLog(@"%@", theEvent);
[super sendEvent: theEvent];
}
My application compiles fine and displays the web request. But
keypresses (among other events) are not NSLog'ed in the run log.
Are there any outlets I need to wire with my NSWindow+customclass
to handle events?
The events of interest might be sent to the application's responder
chain. In that case, it would be NSApplication's sendAction:to:from:
that would be of interest.
To prevent a whole lot of extraneous events, your subclass could
intercept what the responder chain calls and log that. See http://
cocoadev.com/index.pl?NSResponder.
_______________________________________________
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