Notification for mouse-up on NSStepper
Notification for mouse-up on NSStepper
- Subject: Notification for mouse-up on NSStepper
- From: John Stiles <email@hidden>
- Date: Thu, 06 Dec 2007 14:41:54 -0800
I'd like to get notified when the user releases the mouse after
interacting with an auto-repeating NSStepper, so I can update my UI
appropriately.
However, this is challenging. There are no built-in notifications or
delegate methods. I tried subclassing NSStepper and overriding -mouseUp:
but this method is never called.
I suspect (but haven't yet tested) that NSStepper overrides -mouseDown:
and runs its own event loop while the mouse button is down, and consumes
the mouse-up event. If that's the case, then I could override
-mouseDown:, call [super mouseDown:event] and then once it returns, I
know the mouse has been released and the stepper has already gone
through all of its motions. However, I am not sure that this is a safe
thing to rely on; I hate to rely on implementation details that could be
subject to change.
Is there a good way to do this that I haven't thought of?
_______________________________________________
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