Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #14194

Re: Trying to suspend or pause execution of a program (Updated).

From Clif McInnis <c_mcinnis@hotmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Trying to suspend or pause execution of a program (Updated).
Date 2013-04-16 04:34 +0000
Message-ID <kkikce$rno$1@smc.vnet.net> (permalink)
References <kkase2$rjd$1@smc.vnet.net>
Organization Time-Warner Telecom

Show all headers | View raw


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"};
   )]

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Trying to suspend or pause execution of a program. Clif McInnis <c_mcinnis@hotmail.com> - 2013-04-13 06:02 +0000
  Re: Trying to suspend or pause execution of a program (Updated). Clif McInnis <c_mcinnis@hotmail.com> - 2013-04-16 04:34 +0000
  Re: Trying to suspend or pause execution of a program.(updated) Clif McInnis <c_mcinnis@hotmail.com> - 2013-04-16 04:34 +0000

csiph-web