Skip navigation.
 
mltracking area problems on 10.4.11
FROM : Wesley Smith
DATE : Tue Jul 01 23:29:40 2008

Hi,
I'm trying to get the following events to trigger:

- (void)mouseEntered:(NSEvent *)theEvent
- (void)mouseExited:(NSEvent *)theEvent

I'm using this call to get it to work:

[[mWindow contentView] addTrackingRect:[mWindow frame]
                           owner:[mWindow contentView]
                           userData:nil
                           assumeInside:NO];

I've also tried:
[[mWindow contentView] addTrackingRect:[mWindow frame]
                           owner:mWindow
                           userData:nil
                           assumeInside:NO];

mWindow is a custom NSWindow and the content view attached is also a
custom NSView.  I've defined the above event handlers in both custom
classes and set breakpoints, print messages, etc. but despite who I
set as owner of the tracking rect, I can't get the events to trigger.
Is there something else I have to do?

thanks,
wes

Related mailsAuthorDate
mltracking area problems on 10.4.11 Wesley Smith Jul 1, 23:29
mlRe: tracking area problems on 10.4.11 Tony Becker Jul 2, 19:21
mlRe: tracking area problems on 10.4.11 Wesley Smith Jul 2, 20:10
mlRe: tracking area problems on 10.4.11 Tony Becker Jul 2, 20:18
mlRe: tracking area problems on 10.4.11 Wesley Smith Jul 2, 20:21
mlRe: tracking area problems on 10.4.11 Michael Ash Jul 2, 20:43
mlRe: tracking area problems on 10.4.11 Wesley Smith Jul 2, 20:48
mlRE: tracking area problems on 10.4.11 Abernathy, Joshua Jul 3, 19:40
mlRe: tracking area problems on 10.4.11 John C. Randolph Jul 5, 06:14