• 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
No double click event available to an NSView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

No double click event available to an NSView?


  • Subject: No double click event available to an NSView?
  • From: Ken Tozier <email@hidden>
  • Date: Sun, 4 Feb 2007 10:04:43 -0500

Hi

I searched the cocoa archives, Apple's Cocoa documentation and Googled and didn't find any built in detection for double clicks in an NSView. Is that right? Or is it labeled something else?

The only thing I did find was this snippet from Shaun Wexler posted on CocoaBuilder.com

- (void) mouseDown:(NSEvent *) event
{
NSTimeInterval dblTime = (double) GetDblTime() / 60.0;
NSEvent *nextEvent = [NSApp nextEventMatchingMask: NSLeftMouseDownMask
untilDate: nil
inMode: NSDefaultRunLoopMode
dequeue: NO];


if (nextEvent && ([nextEvent timestamp] - [event timestamp] < dblTime))
{
NSLog(@"a possible double-click event is pending...");
}


   [super mouseDown:event];
}

Is that the way this has to be done?

Thanks

Ken
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Follow-Ups:
    • Re: No double click event available to an NSView?
      • From: Ricky Sharp <email@hidden>
  • Prev by Date: Re: Event handling question
  • Next by Date: Re: No double click event available to an NSView?
  • Previous by thread: Re: Event handling question
  • Next by thread: Re: No double click event available to an NSView?
  • Index(es):
    • Date
    • Thread