• 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
Notification for mouse-up on NSStepper
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Notification for mouse-up on NSStepper
      • From: "Ken Ferry" <email@hidden>
    • Re: Notification for mouse-up on NSStepper
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: NSNib: replacement objects
  • Next by Date: MEETING: Chicago CocoaHeads / CAWUG - Dev Tools & ObjC2 - Tuesday December 11th 7:00 PM
  • Previous by thread: Re: NSNib: replacement objects
  • Next by thread: Re: Notification for mouse-up on NSStepper
  • Index(es):
    • Date
    • Thread