Capture view
Tried using another view over the top of the WebView to capture mouse events. Not as straight forward as I thought. Sure the mouse events worked, but I was not able to pass the mouse events down to the WebView.
The classes were arranged as follows:
WebView -> HawkView -> HawkCaptureView
From HawkCaptureView I had:
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"mouseDown");
[super mouseDown:theEvent];
}
The mousedown is detected and then passes it to HawkView which is the super class. However I just realised that I need to be passing it to the view which renders the HTML.
The classes were arranged as follows:
WebView -> HawkView -> HawkCaptureView
From HawkCaptureView I had:
- (void)mouseDown:(NSEvent *)theEvent
{
NSLog(@"mouseDown");
[super mouseDown:theEvent];
}
The mousedown is detected and then passes it to HawkView which is the super class. However I just realised that I need to be passing it to the view which renders the HTML.
0 Comments:
Post a Comment
<< Home