NSView receives twice and more "mouseEntered" when window show&hide
NSView receives twice and more "mouseEntered" when window show&hide
- Subject: NSView receives twice and more "mouseEntered" when window show&hide
- From: Constantine <email@hidden>
- Date: Thu, 27 Sep 2007 20:27:45 +0800
Hi
I subclassed a NSView object to get the "mouseEntered / mouseExited"
notifications with "addTrackingRect: owner: userData: assumeInside:"
methord.
But I found that once I show & hide or miniaturize & deminiaturize
the window where the view is in, app will receive once more
"mouseEntered / mouseExited " notification when mouse entered/exited
the view.
So I add observers for "NSApplicationDidHideNotification /
NSApplicationDidUnhideNotification"
and "NSWindowDidMiniaturizeNotification /
NSWindowDidDeminiaturizeNotification" to remove and add the tracking
rectangle everytime I received the notifications to avoid that.
Is there any better solution? Any help will be greatly appreciated!
Liu Qi
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden