Re: Always allowing drags from WebView inside a global NSPanel
Re: Always allowing drags from WebView inside a global NSPanel
- Subject: Re: Always allowing drags from WebView inside a global NSPanel
- From: Nick Beadman <email@hidden>
- Date: Tue, 23 Sep 2008 15:36:36 -0700
Ben,
On Sep 23, 2008, at 8:19 am, Benjamin Stiglitz wrote:
The problem I am having is that to drag out of the WebView the
panel has to be main (i.e. the close/minimize/zoom buttons are
filled in). However, if you hold down the command key, the drag
out of that window works fine.
Where do I start looking to make this work without having to hold
down the command key?
Have you looked at -[NSView acceptsFirstMouse:]?
Thanks for the heads up. This does look like what I need, however, it
requires me to override the NSView's that make up WebView. Simply sub-
classing WebView and returning YES from acceptsFirstMouse: doesn't work.
Looking back through the stack trace from the WebUIDelegate methods it
appears that the actual class I am trying to change the implementation
of acceptsFirstMouse: is the private WebHTMLView.
It is not clear to me where to go from here. poseAs: is deprecated and
even then I am dealing with a private class. I am going to try and see
if I can get either -[NSApplication sendEvent:] or -[NSWindow
sendEvent:] to temporarily bring the window to the front before
sending on the event.
Any other ideas are welcomed,
Nick
--
Nick Beadman
email@hidden
(sent from my mailing list account, email@hidden)
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden