site_archiver@lists.apple.com Delivered-To: cocoa-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:mime-version :content-type:from:in-reply-to:date:cc:content-transfer-encoding :message-id:references:to:x-mailer; bh=Z54GjzsAMmmtBIMTSiD2xfMdLZjuhAzTcynbDJEPsjQ=; b=WO7Sq64OKL02DYrjyQHLHlGKpeBFyyL0KoEJTJ+XEWwcnwaRmEbRxZdiBuT+bhKwRk gIWOZyKPwQqu8MQtfGpeomvfqJUAonXW5s2dPrTS9DIDvam5uucuh56HdC/zSX8b+vOf Ji/Fts2yIADprd87ovgBLwSGrVtOffOE7PgyM= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=p967YRWVHud4TEWY5pe4fLc40/HUsLOWNgOiQ/HfNgN84nchfwEu8a5qAcKemeR96b oy9jOU2diOH6vW+HRD8B6UkEcxMpf2Ip+KZaksdMG5nwIzIxYj2Mt6bBxwRGruhcPimX iWQlN7BI5VO/UkaoZ/dIL/K98rwgurkEH2j1U= VERY INTERESTING!!! :D G. On Dec 31, 2009, at 2:25 PM, Andreas Mayer wrote:
Am 31.12.2009 um 00:09 Uhr schrieb Ken Thomases:
There is no mouse-up event. He wants to present a menu if there's been X time since the mouse-down even when _no other events have arrived since then_. There's no getting around using a timer of some sort.
That's a case for -performSelector:withObject:afterDelay: (which obviously uses a timer of some sort)
- (void)mouseDown:(NSEvent *)theEvent { // send openMenu: to self after 0.8 seconds [self performSelector:@selector(openMenu:) withObject:nil afterDelay:0.8]; }
- (void)mouseUp:(NSEvent *)theEvent { // user released mouse button - cancel previous perform request [NSObject cancelPreviousPerformRequestWithTarget:self selector:@selector(openMenu:) object:nil]; }
(Typed in Mail.app)
Andreas _______________________________________________
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/gustavxcodepicora%40gmail.c...
This email sent to gustavxcodepicora@gmail.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/site_archiver%40lists.apple... This email sent to site_archiver@lists.apple.com
participants (1)
-
Gustavo Pizano