Now that you  mention this I have a similar problem in a view.

in my loadDidMoveToWindow I create the tracking areas referring the frame of 
some labels in the view, but the mouseEntered is not trigger unless I click one 
of the labels.

I tried making the view the first responder,  and overriding the 
acceptsFirstResponder, resignFirstResponder and becomeFirstResponder methods, 
but no succes, the user must click one of the labels and then the tracking area 
methods start "tracking" 

Gustavo.



On Mar 16, 2010, at 8:23 PM, Quincey Morris wrote:

> 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 (Cocoa-dev@lists.apple.com)
> 
> 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/gustavxcodepicora%40gmail.com
> 
> This email sent to gustavxcodepic...@gmail.com

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to