• 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
NSSlider: differentiating mouseDown, mouseUp, mouseDragged
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSSlider: differentiating mouseDown, mouseUp, mouseDragged
      • From: Karl Kraft <email@hidden>
  • Prev by Date: Re: How to "touch" a folder?
  • Next by Date: null values in NSArray ???
  • Previous by thread: Re: Removing From TabView?
  • Next by thread: Re: NSSlider: differentiating mouseDown, mouseUp, mouseDragged
  • Index(es):
    • Date
    • Thread