No double click event available to an NSView?
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