• 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
Re: NSSlider and doube-click event
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: NSSlider and doube-click event (From: Wagner Truppel <email@hidden>)
 >Re: NSSlider and doube-click event (From: "Simon Raisin" <email@hidden>)
 >Re: NSSlider and doube-click event (From: Robert Martin <email@hidden>)

  • Prev by Date: Re: What are the official limits of Cocoa when it comes to the length of path names?
  • Next by Date: Re: Using proxy objects with NSMutableArray
  • Previous by thread: Re: NSSlider and doube-click event
  • Next by thread: Cocoa in sunny Florida
  • Index(es):
    • Date
    • Thread