Re: Need longer highlight w/ NSButton performClick:
Re: Need longer highlight w/ NSButton performClick:
- Subject: Re: Need longer highlight w/ NSButton performClick:
- From: Ricky Sharp <email@hidden>
- Date: Mon, 28 Mar 2005 16:52:19 -0600
On Mar 28, 2005, at 2:19 PM, Glen Simmons wrote:
thanks for the input. Wouldn't I also need to call [super
performClick:] somewhere? Do you think before or after the sleep?
Sorry, should've just tried it instead of being lazy and asking. Upon
trying, the above does the highlight, but doesn't perform the action.
I removed the last two lines and replaced them with [super
performClick:] and the highlight is turned off and the action is
performed. So this will do just what I want.
Sorry about that; I was quite rushed when posting that message. It was
taken from a custom button class as well where the last line in the
function performed the action.
Does anyone see any problem with this? I always feel a little uneasy
about sleeping in the main thread, but it should be OK if it's low
enough (.1 sec or so), right?
I do plan to revisit that code. Currently though, I don't have any
animations, etc. going on. Thus, sleeping the thread made the most
sense at the time. I basically wanted to guarantee that that user (or
other entity**) didn't inject any more events. I suppose I could have
flushed the event queue after the delay, but will leave that as an
exercise for myself later :)
** Other entity includes a timer that runs my automated test script
(basically simulates clicks).
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden