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

Re: Notification for mouse-up on NSStepper


  • Subject: Re: Notification for mouse-up on NSStepper
  • From: Alastair Houghton <email@hidden>
  • Date: Fri, 7 Dec 2007 10:41:32 +0000

On 6 Dec 2007, at 22:41, John Stiles wrote:

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?

FWIW, I can't think of one, and I've also had to write code previously that relies on the system-provided classes using the tracking-loop approach to mouse tracking.


I doubt Apple will change any class currently using a tracking-loop to use three-method tracking, but it would be nice to have some guarantee that any system-defined NSResponder subclass that currently tracks the mouse this way will *always* track the mouse this way, at least for applications built on currently shipping systems.

It's a shame that there's no obvious way from code to distinguish between the two cases (i.e. tracking loop versus three-method approach).

Kind regards,

Alastair.

--
http://alastairs-place.net


_______________________________________________

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: glenn andreas <email@hidden>
References: 
 >Notification for mouse-up on NSStepper (From: John Stiles <email@hidden>)

  • Prev by Date: Re: Assignment problem with doubles: turning into NaN under Leopard
  • Next by Date: Re: Trouble creating drag image from a partial view
  • Previous by thread: Notification for mouse-up on NSStepper
  • Next by thread: Re: Notification for mouse-up on NSStepper
  • Index(es):
    • Date
    • Thread