Handling mouse events in a WebView
Handling mouse events in a WebView
- Subject: Handling mouse events in a WebView
- From: Robert Borsuk <email@hidden>
- Date: Wed, 17 Sep 2003 13:07:52 -0400
Hi All,
I've been beating my head on this one. I've combed both the cocoamasm
archives and the Webkit archives in search of answer, but I can't seem
to locate what I need.
Here's the problem:
I have a window with a webview. The webview takes up the entire
window. I would like to be able to get mouse events for mouse up,
mouse down, and mouse drag.
Here's what I have so far:
I have subclassed the window but mouse events aren't being called in
there.
I made my controller a WebUIDelegate for the webview. I can now get a
mouseDidMoveOverElement event but it doesn't seem to be able to tell me
mouse up, down, etc .
I thought I would be clever and in the mouseDidMoveOverElement event I
would put a
if ([[NSApp currentEvent] type]==NSLeftMouseDown)
{
NSLog(@"mouse down");
}
but this doesn't seem to work.
Oh, I also tried subclassing WebView but that gave me some nasty errors.
Anyone have any ideas or experience with this kind of thing.
Thanks
Rob Borsuk
email@hidden
_______________________________________________
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.