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: WebView Mouse Events



I subclassed NSWindow to override sendEvent:, and pass along clicks in the web view to that webview as a special message.





On Apr 22, 2006, at 8:59 PM, haym37 wrote:

Hi,

I would like to able to override the mouseDown method for a WebView, however, I have discovered that this method does not exist with a WebView. After subclassing the WebView I, therefore, used this:


- (void)webView:(WebView *)sender mouseDidMoveOverElement: (NSDictionary *)elementInformation modifierFlags:(unsigned int) modifierFlags
{
if ([[NSApp currentEvent] type] == NSLeftMouseUp)
NSLog(@"here");
}


That method works, however, it does not work when the user clicks on a form element (i.e. button). I could place a transparent NSView or NSWindow over the WebView and capture mouse events through that, however, I want to be able to disable mouse events (and key events) (so, for instance, when the user clicks on, suppose, a button, nothing will occur (it won't be pressed down/ turn blue, etc.)) in the WebView as well as be notified when an event occurs in the WebView.

Thanks!
_______________________________________________
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/list3679321% 40karelia.com


This email sent to email@hidden

-- Dan Wood email@hidden Karelia Software — Sandvox for the Mac http://www.karelia.com/


_______________________________________________ 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: 
 >WebView Mouse Events (From: haym37 <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.