Re: How to avoid multiple clicks on a push button
Re: How to avoid multiple clicks on a push button
- Subject: Re: How to avoid multiple clicks on a push button
- From: Uli Kusterer <email@hidden>
- Date: Thu, 25 Nov 2010 12:38:17 +0100
On Nov 22, 2010, at 10:54 AM, Abhijeet Singh wrote:
> Hi,I am working on a user interface. There is only one window in my application with Back and Next buttons on it. On Next / Back button click my application performs some task and the current view is swapped with another view in the window. It works fine until somebody clicks Next (or Back) button twice in succession like a double click. The event is fired 2 times and it messes up the whole functionality of my application. I tried controlling this behavior by disabling the buttons as soon as they are clicked but it doesn't help. Still the event is fired multiple times. Is there any way i can control this behavior of the push buttons. Please help....RegardsAbhijeetDear cocoadev ! Get Yourself a cool, short @in.com Email ID now!
The best way to do this is to write your code (i.e. the controller and the model, not the view) to keep internal state. That way you can remember whether this is a situation where two clicks are OK or not.
Alternately, have you tried setIgnoresMultiClick: ?
Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden