Re: addTrackingRect fails?
Re: addTrackingRect fails?
- Subject: Re: addTrackingRect fails?
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 28 Jun 2001 12:36:51 +0200
On jeudi, juin 28, 2001, at 07:21 AM, Gregory Weston wrote:
Are there any preconditions on creating tracking rectangles? I've got a
view that attempts to create several in its initWithFrame: method, but
the return from every call to addTrackingRect... is 0 (which seems
wrong) and my mouseEntered and mouseExited methods never get invoked
(which seems to support the notion of wrong-ness). Any hints?
[self addTrackingRect: someRect owner:self userData:NULL
assumeInside:NO]
IIRC you can't add a tracking rect in the initWithFrame: method.
There is also a problem which is not described in the NSView
documentation: when a view is removed from its superview, the tracking
rect is lost. This is a bit problematic when you have a NSTabView and
some view inside that have a tracking rect.