On Dec 30, 2009, at 2:53 AM, slasktrattena...@gmail.com wrote: > Simple. Start a timer on mouse down, invalidate it on mouse up. > Something like this (written in mail): > > NSTimer *timer; > > -(void)mouseDown:(NSEvent*)ev > { > timer=[[[NSTimer alloc] blah ...] retain]; > } > > -(void)mouseUp:(NSEvent*)ev > { > if ( [timer isValid] ) { > [timer invalidate]; > [timer release]; > timer = nil; > } else { > // perform single-click action > } > } > > -(void)performHoldAction:(NSTimer*)tmr > { > // pop up menu > }
Not to 'invalidate' your suggestion, but why not simply ask the appropriate event objects for their timestamps ? Or did I overlook something in the original question ? Cheers, . . . . . . . . Henry ================================================= iPhone App Development and Developer Education . . . Visit www.nonatomic-retain.com Mac OSX Application Development, Plus a Great Deal More . . . Visit www.trilithon.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com