• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to avoid multiple clicks on a push button
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >How to avoid multiple clicks on a push button (From: "Abhijeet Singh" <email@hidden>)

  • Prev by Date: Re: Responding to the keyboard in an NSCell
  • Next by Date: Re: Responding to the keyboard in an NSCell
  • Previous by thread: Re: How to avoid multiple clicks on a push button
  • Next by thread: Asking an outline/table view to send it's setObjectValue:... message
  • Index(es):
    • Date
    • Thread