• 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: handling events within NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >handling events within NSWindow (From: Alex Reynolds <email@hidden>)

  • Prev by Date: Re: Error with [pluginBundle infoDictionary]
  • Next by Date: Re: Error with [pluginBundle infoDictionary]
  • Previous by thread: handling events within NSWindow
  • Next by thread: programatically changing values on a bound NSSlider
  • Index(es):
    • Date
    • Thread