Re: trackingRect can't be removed?
Re: trackingRect can't be removed?
- Subject: Re: trackingRect can't be removed?
- From: "Julien Jalon" <email@hidden>
- Date: Tue, 21 Mar 2006 00:49:04 +0100
Note that removing tracking rects in dealloc is a no-no. As I stated
in my previous mail, you can manage tracking rects only if your view
is inside a window. So dealloc is too late to manage your rects.
On 3/20/06, John C. Randolph <email@hidden> wrote:
>
> On Mar 20, 2006, at 11:29 AM, Michael Link wrote:
>
> > I have a button subclass to do rollovers and am experiencing some
> > strange behavior with removal of the trackingRect when the view is
> > removed from the superview.
> >
> > When I click the rollover button to have the view removed from the
> > superview and discarded it seems that even though the trackingRect
> > is removed it isn't. The button gets a MouseEntered event and then
> > I click the button and it sends its action to be removed (and it
> > is). Next when I move the mouse out of the supposedly deleted
> > trackingRect a MouseExited event is generated and sent to the freed
> > object which causes a crash.
> >
> > Anyone else experience something like this?
>
> I've never run into this problem, but it looks to me like it's
> failing because you're trying to add a tracking rect when the button
> is supposed to be getting destroyed. Did you override -dealloc or
> something?
>
> -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
>
_______________________________________________
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