Re: NSTrackingArea Problem
Re: NSTrackingArea Problem
- Subject: Re: NSTrackingArea Problem
- From: Richard Somers <email@hidden>
- Date: Mon, 15 Mar 2010 22:49:34 -0600
On Mar 15, 2010, at 15:18, Richard Somers wrote:
1. With the mouse inside the view, a keyboard shortcut is entered to
bring up the panel.
2. Move the mouse outside the view, and then close the panel (with
keyboard shortcut, window close box, or with the menu, it does not
matter).
3. Move the mouse back inside the view and mouse moved tracking has
stopped. That is the problem. Mouse moved tracking should be active
but it is not.
4. Move the mouse outside the view and back in again and now mouse
tracking is active again.
On Mar 15, 2010, at 5:53 PM, Quincey Morris wrote:
You likely need to use the NSTrackingAssumeInside option. The actual
behavior of this option is not as documented. IIRC, without this
option the tracking isn't going to start reliably until you exit and
re-enter the area.
Thanks for looking at this but unfortunately the suggestion did not
work.
My application is document based with an inspector panel similar to
this.
http://borkware.com/rants/inspectors/
At step 3 above the document window is key and the view contained
there in is the first responder but mouse moved tracking does not
work. Mouse moved tracking works if you exit and re-enter the view.
Various NSTrackingAreaOptions produce the following results.
NSTrackingActiveWhenFirstResponder: should work but does not.
NSTrackingAssumeInside: using this modifier does not help, same
problem.
NSTrackingActiveInKeyWindow: same problem.
NSTrackingActiveInActiveApp: fixes the problem but with the side
effect that tracking is active all the time now (when the app is
active).
--Richard
_______________________________________________
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