• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTrackingArea Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTrackingArea Problem


  • Subject: Re: NSTrackingArea Problem
  • From: Quincey Morris <email@hidden>
  • Date: Tue, 16 Mar 2010 12:23:37 -0700

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@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

  • Follow-Ups:
    • Re: NSTrackingArea Problem
      • From: Richard Somers <email@hidden>
    • Re: NSTrackingArea Problem
      • From: Gustavo Pizano <email@hidden>
References: 
 >NSTrackingArea Problem (From: Richard Somers <email@hidden>)
 >Re: NSTrackingArea Problem (From: Quincey Morris <email@hidden>)
 >Re: NSTrackingArea Problem (From: Richard Somers <email@hidden>)

  • Prev by Date: app window that doesn't deactive the current app
  • Next by Date: setting NSScrollView content width to NSText width
  • Previous by thread: Re: NSTrackingArea Problem
  • Next by thread: Re: NSTrackingArea Problem
  • Index(es):
    • Date
    • Thread