Re: NSButtonCell mouseEntered/mouseExited stops after view is swapped out ...
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