Re: NSSlider and mouse events
Re: NSSlider and mouse events
- Subject: Re: NSSlider and mouse events
- From: Kyle Hammond <email@hidden>
- Date: Thu, 3 Mar 2005 17:00:48 -0600
I need to know when an NSSlider is being controlled by the user.
From your original comment, maybe the best way to go is simply turn on
the "Continuous" checkbox for the slider. Then your action method will
be called a lot as the user moves the slider around. You won't be
notified explicitly when the user stops moving the slider, so maybe
that's not what you're looking for and you do need to subclass.
You could take a look at the open source SMDoubleSlider project at
<http://developer.snowmintcs.com/>. The code subclasses NSSlider and
NSSliderCell successfully.
Kyle
Thanks for the comment. That is exactly the problem. The solution
seems
to be to subclass NSSliderCell and override the
stopTracking:at:inView:mouseIsUp method. The overridden class must
then be
programatically assigned to the NSSlider object.
--
Louis
At 09:41 AM 3/3/05, Robert Clair wrote:
Since NSSlider is a descendant of NSResponder, shouldn't it receive
the
mouseUp notification?
In a lot of the controls the mouseDown routine polls for mouseDragged
events and the mouseUp event. It essentially takes over the event
processing until mouseUp. This makes it extremely tricky to subclass.
Bob Clair
---------------------
Kyle Hammond
email@hidden
<http://www.snowmintcs.com/> - personal productivity software
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden