Re: Tracking rects
Re: Tracking rects
- Subject: Re: Tracking rects
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 5 Nov 2005 06:53:10 -0800
On Nov 3, 2005, at 2:00 AM, Tristan Leblanc wrote:
1: Are tracking rects installed in a view are released when
disposing of it ?
Actually, they're kept by the window, not the view, even though -
addTrackingRect: is an NSView method. You should keep a list of the
tracking rect tags, and remove them yourself with -
removeTrackingRect: in your -dealloc method, and if you're moving
your view around in the heirarchy, you should take care to clean up
any stale ones in -viewWillMoveToSuperview:
If the whole window is going away, you don't need to bother removing
your tracking rects.
2: Why can't I track my rects while the mouse is down???
Because in that case, your app is getting mouseDragged events, not
mouseMoved events.
-jcr
John C. Randolph <email@hidden> (408) 914-0013
Roaming Cocoa Engineer,
Available for your projects at great Expense and Inconvenience.
_______________________________________________
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