Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum > General > > ""Button" control object"

Post Reply:
Name:
Email Address:

Please send email when my message is replied to.

Url (optional):
Subject:
Message: view original message?
Attachment (optional):
Please answer this:4+4 =



Original Message (ID '236045') By Michael:
In Response To 'Re: Re:' --------- Look at the option setting Method -> "Queued" (instead Method -> "Preemptive") An alternative might be to set a flag and have the action check the flag to see if Mathematica was in the middle of evaluating another button click. Or you might use them together. This one discards clicks until it's done with the action: Button["hi", If[actionFlag =!= "busy", actionFlag = "busy"; Pause[2]; Beep[]; actionFlag = "free"]] This one queues clicks, so each click results in a beep after a wait. Button["hi", If[actionFlag =!= "busy", actionFlag = "busy"; Pause[2]; Beep[]; actionFlag = "free"], Method -> "Queued"]