NSSlider: differentiating mouseDown, mouseUp, mouseDragged
NSSlider: differentiating mouseDown, mouseUp, mouseDragged
- Subject: NSSlider: differentiating mouseDown, mouseUp, mouseDragged
- From: Greg Hurrell <email@hidden>
- Date: Sat, 18 Jan 2003 02:04:48 +1030
Hi,
I have a continuous NSSlider in my app and I've hooked it up in IB to
an "sliderModified" action.
Unfortunately, I can see no way to distinguish between mouseDown,
mouseUp and mouseDragged events for the slider. In all three cases I
wind up in the sliderModified method and I can't find a way to tell
which type of mouse interaction got me there. (If there was something
like [NSEvent lastEvent] then I would try using that, but there doesn't
seem to be...)
I've tried subclassing NSSlider and putting overrides like this in the
subclass:
- (void)mouseUp:(NSEvent *)theEvent;
- (void)mouseDown:(NSEvent *)theEvent;
- (void)mouseDragged:(NSEvent *)theEvent;
But only the mouseDown: method ever gets called, not the other ones.
How can I find out what kind of action is resulting in my slider method
being called?
Cheers :-)
Greg
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.