Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2013

[Date Index] [Thread Index] [Author Index]

Search the Archive

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

  • To: mathgroup at smc.vnet.net
  • Subject: [mg130491] Re: Trying to suspend or pause execution of a program (Updated).
  • From: Clif McInnis <c_mcinnis at hotmail.com>
  • Date: Tue, 16 Apr 2013 00:34:51 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <kkase2$rjd$1@smc.vnet.net>

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



  • Prev by Date: Plot with axes exchanged
  • Next by Date: Turning a Sequence into a List?
  • Previous by thread: Re: Plot with axes exchanged
  • Next by thread: Turning a Sequence into a List?