controller.wait

getController(id).wait() (since PennController 1.7)

or getController(id).wait( test ) (since PennController 1.7)

Waits until the controller has been completed.

Example:

[js highlight=”9″ try=”true”]newButton(“Start reading”)
.print()
.wait()
.remove()
,
newController(“DashedSentence”, {s: “The mouse that the cat that the dog is petting is hugging is happy”} )
.print()
.log()
.wait()
.remove()
,
newText(“Good job!”)
.print()
[/js]

Published by Jeremy

Researcher in semantics and pragmatics; Programmer of PennController for IBEX