• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSView receives twice and more "mouseEntered" when window show&hide
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Printing : how to force paper format ?
  • Next by Date: Re: creating a cocoa nsapp event polling callback
  • Previous by thread: Printing : how to force paper format ?
  • Next by thread: (NSURLDownload)The control never reaches downloadDidFinish:
  • Index(es):
    • Date
    • Thread