Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: subclassing WebView



On Oct 13, 2006, at 4:21 PM, Alex Reynolds wrote:

I'm trying to subclass WebView in order to override and handle keypress events

That won't work well. Events go to the first responder. There are NSView objects inside the WebView, and it's one of them that's going to be first responder, not the WebView itself.


Depending on what you're trying to do, your best bet may be to catch the events in NSWindow before they ever get to the view inside the WebView. You can override sendEvent: in NSWindow, and check if the first responder is a view inside the WebView you care about, and then do whatever you'd like.

    -- Darin

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden
References: 
 >subclassing WebView (From: Alex Reynolds <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.