Re: NSSlider and mouse events
Re: NSSlider and mouse events
- Subject: Re: NSSlider and mouse events
- From: Louis Sinclair <email@hidden>
- Date: Fri, 04 Mar 2005 09:16:16 -0600
I thought I needed to interrupt a process at the start of a slider drag,
and resume it on the button's release, but I found another solution. In
the meantime, I successfully made an NSSlider report the events I thought I
needed, so the adventure was well worth it from a learning standpoint.
It's just too bad that the NSSlider doesn't co-exist well with the rest of
the UI, NSTimer events in particular. Thanks for the info on the double
slider project. I'll give it a look.
--
Louis
At 05:00 PM 3/3/05, Kyle Hammond wrote:
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
--
Louis Sinclair
Minnetonka Audio Software, Inc.
_______________________________________________
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