Re: NSSlider and doube-click event
Re: NSSlider and doube-click event
- Subject: Re: NSSlider and doube-click event
- From: "Simon Raisin" <email@hidden>
- Date: Fri, 13 Jul 2007 06:51:41 -0400
Thank you Martin. If you'll check I specifically asked if I had to subclass
NSSlider in my original question. That was all I needed to know.
Thank you again.
-CxT
On 7/13/07, Robert Martin <email@hidden> wrote:
You have to subclass NSSlider and override its mouseDown method -
it's all in the Cocoa Event-Handling Guide documentation. Something
like:
- (void) mouseDown: (NSEvent *)theEvent
{
if ([theEvent clickCount] > 1) {
// Do your double-click stuff...
}
else
[super mouseDown:theEvent];
}
Don't forget to change the slider's class to your subclass in the nib
file and your controller.
On Jul 12, 2007, at 10:29 PM, Simon Raisin wrote:
> <...snip...>
>
> But unfortunately I still don't understand HOW or WHERE to put the
> code that
> would handle the double-click for the NSSlider.
>
> Say I create a new cocoa based xcode project. I open up IB and
> drop a new
> NSSlider onto the window.
>
> Now I create an "AppController" class that has an IBOutlet that
> refers to
> the slider and I hook them up.
>
> I build and run the app then I double-click on the slider. I'm
> still no
> closer to understanding how to handle the mouse click events.
_______________________________________________
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