• 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
Handling mouse events in a WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Handling mouse events in a WebView
      • From: Robert Borsuk <email@hidden>
  • Prev by Date: Problem with NSTextCell subclass
  • Next by Date: NSImage -PDFRepresentation method (was Re: DragDropImageView (solution))
  • Previous by thread: Problem with NSTextCell subclass
  • Next by thread: Re: Handling mouse events in a WebView
  • Index(es):
    • Date
    • Thread