Hello List,I have the following code which works as expected on a normal NSView in a normal window. However it does not work when used on a view hosted on a completely transparent overlay window. The overlay is a child window of a normal NSDocument main window in case that matters. I've tried to make the overlay non-transparent to see if that causes it but it doesn't make any difference. MyView cursorUpdate: is never called.
Is there something wrong with my code or is there a chance tracking areas don't work on child windows?
Thanks for any pointers. Regards Markus @implementation MyView - (void)cursorUpdate:(NSEvent *)theEvent { NSLog(@"cursor updated"); [[NSCursor openHandCursor] set]; } - (void)updateTrackingRect { if (cursorTrackingArea) { [self removeTrackingArea:cursorTrackingArea]; [cursorTrackingArea release]; cursorTrackingArea = nil; NSLog(@"tracking area removed"); } NSRect rect = NSInsetRect([self bounds], 6, 6); if ((rect.size.width > 1) && (rect.size.height > 1)) { cursorTrackingArea = [[NSTrackingArea alloc] initWithRect:rectoptions:(NSTrackingCursorUpdate | NSTrackingActiveInActiveApp)
owner:self userInfo:nil]; [self addTrackingArea:cursorTrackingArea]; NSLog(@"tracking area updated"); } } @end -- __________________________________________ Markus Spoettl
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]