Re: Speaking of tracking rects...
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