• 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: Speaking of tracking rects...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speaking of tracking rects...


  • Subject: Re: Speaking of tracking rects...
  • From: Dave Budde <email@hidden>
  • Date: Sun, 10 Sep 2006 07:54:51 -0700

No, no, no, no, and also no. Did I mention no?

The tracking rect tag that's returned from addTrackingRect:... is not
documented to follow any behavior other than being unique. The system
would be perfectly fine in returning 42, then 1000000, then -1, etc.
By assuming they start at 3 and work up, you're relying on an
implementation detail that could change at any moment.

The correct way to figure out which tracking rect the mouse entered is
to use the userData: argument of this method. Pass it something handy
and identifying-like, then you can get it back out of the NSEvent when
things come in and do something with it.

Mike

Mike, thanks for that warning. I was talking about the trackingNumber in NSEvent not the tracking tag assigned from addTrackingRect. Sorry for the confusion. The trackingNumber (according to the documentation) is an identifier for a tracking rectangle, correct? My understanding is that it should be able to be used reliably to figure out which tracking rect is being entered.


Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Re: Speaking of tracking rects...
      • From: "Michael Ash" <email@hidden>
  • Prev by Date: Recent menu items and SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar)
  • Next by Date: Newbie:initialize at app. startup?
  • Previous by thread: Re: Speaking of tracking rects...
  • Next by thread: Re: Re: Speaking of tracking rects...
  • Index(es):
    • Date
    • Thread