On Mar 16, 2010, at 11:34, Richard Somers wrote: > Consider a view with a mouse moved tracking area. When the view is created > and placed on screen, if the mouse is already inside the view, tracking does > not begin until the mouse exits and re-enters the view. Does anyone know how > to get tracking to work initially when the mouse is inside the view? > > I think this may be the root of my problem and as previously mentioned using > NSTrackingAssumeInside does not help.
I'm not sure what the answer is. It seems very context dependent, and maybe there are other relevant factors. This may be a situation where the API contract is insufficient. There really aren't any promises about how the tracking process starts and stops. That means it's hard to know whether the actual behavior is buggy. If you can get acceptable results using NSTrackingActiveInActiveApp, you might want to consider tracking the first responder status yourself (that is, receive the entered/exited/moved messages, don't do anything unless the view is first responder). Alternatively, you might consider removing the tracking area when the view loses first responder status, and recreating it when the view becomes first responder again. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
