Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Trying to suspend or pause execution of a program.
Replies: 2   Last Post: Apr 16, 2013 12:34 AM

 Messages: [ Previous | Next ]
 Clif McInnis Posts: 11 Registered: 4/11/13
Re: Trying to suspend or pause execution of a program (Updated).
Posted: Apr 16, 2013 12:34 AM

Here is the program that I am working on. It is just a little counting exercise for K and Pre-K. The problem is that you can press buttons that will cause the number of balls on the screen to be quite different from what is being said. I have worked with putting "Pause" in several places; for different lengths of time, and using Enabled->False/(True) in an attempt to make the buttons inactive until the computer had finished "speaking". So far none of what I have tried has helped, so I was hoping to get some suggestions from the community.

Clif McInnis

Manipulate[
Pane[Column[{Text[
Row[If[n < 2, {Spacer[160],
Style[nnames[[n]], Bold, Large, Hue[RandomReal[]]],
Style[" Ball", Bold, Large, Green]}, {Spacer[160],
Style[nnames[[n]], Bold, Large, Hue[RandomReal[]]],
Style[" Balls", Bold, Large, Green]}]]],
Row[Table[Graphics[{
Darker[Green], Disk[],
Text[
Style[numerals[[ r]], Orange, "Label", 48], {0, 0}]}], {r, 1,
n}]
]}, BaseStyle -> {LinebreakAdjustments -> {1., 10, 0, 0,
10}}], {525, 300}],
Row[{Button[
" Start \n ", {n = 1,
Speak["lets count the numbers 1 to 10 out loud. One"]}],
Spacer[55],
Button[
"\[FilledLeftTriangle]\[FilledLeftTriangle] Start Over", {n = 1,
Speak["one"]}],
Button[
"\[FilledLeftTriangle] Less", {If[
n < 2, {n = 1,
Speak["Today we are just working on the numbers from one to \
ten."]}, {n -= 1, Speak[n]}]}], Spacer[10],
Button[
"More \[FilledRightTriangle]", {If[
n > 9, {n = 10,
Speak["Lets learn the numbers from one to ten before we go \
on."]}, {n += 1, Speak[n]}]}],
Button[
"All \[FilledRightTriangle]\[FilledRightTriangle]", {n = 10,
Speak["ten"]}]
}],
{{n, 1, " "}, ControlType -> None},
SynchronousUpdating -> False,
Initialization :> (
numerals = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "10",};
nnames = {"One", "Two", "Three", "Four", "Five", "Six", "Seven",
"Eight", "Nine", "Ten"};
)]

Date Subject Author
4/13/13 Clif McInnis
4/16/13 Clif McInnis
4/16/13 Clif McInnis