• 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
Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...


  • Subject: Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
  • From: PGM <email@hidden>
  • Date: Tue, 3 Jul 2007 10:12:28 -0400


I'm seeing NSButtonCell stop acknowledging mouseEntered/mouseExited events after its superview is removed from, and then re-added to a window.


I have a window whose contentViews can be switched. The contentViews contain buttons that initiate the switching.

I subclassed NSButton and NSButtonCell, so that I could over-ride NSButtonCell's mouseEntered and mouseExited methods (I want to update my UI when this happens - why isn't important).

Everything works absolutely fine, and I can see mouseEntered/Exited firing off happily.

I switch to the other view. Again, the mouseEntered/mouseExited methods for its button cell fire off no problem.

I switch back to the original view - mouseEntered/mouseExited no longer work on either button.

I've posted the actual code below.

Any suggestions or workarounds would be great.

   cheers,
           m.


Did you update the trackingRects/cursorRects for your NSButton?

http://developer.apple.com/documentation/Cocoa/Conceptual/ EventOverview/MouseTrackingEvents/chapter_7_section_2.html

Good luck, Patrick
_______________________________________________

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


  • Follow-Ups:
    • Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
      • From: Martin Redington <email@hidden>
References: 
 >NSButtonCell mouseEntered/mouseExited stops after view is swapped out ... (From: Martin Redington <email@hidden>)

  • Prev by Date: Re: drag & drop objects
  • Next by Date: Re: drag & drop objects
  • Previous by thread: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
  • Next by thread: Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
  • Index(es):
    • Date
    • Thread