PennController for IBEX › Forums › Support › Exit button › Reply To: Exit button
June 19, 2020 at 12:44 pm
#5684
Keymaster
Hi Nickolas,
Here is an updated version of the code above that should work with PennController 1.8:
PennController.ResetPrefix(null)
AddTable("myTable", `Label,Text
target,Hello
filler,hello
target,World
filler,world`)
Sequence("welcome", rshuffle("target","filler"))
Header(
newCanvas("confirmation", '75vw', '80vh')
.css({'background-color': "floralwhite", 'z-order': 9999})
.add( "center at 50%", "middle at 25%" , newText("Are you sure you want to send your incomplete results now?") )
.add( "center at 50%", "middle at 75%" , newScale("quit", "Yes", "No").size("10em","auto").button() )
,
newButton("stop", "Stop").callback(
getCanvas("confirmation")
.print("center at 50vw", "middle at 50vh")
,
getScale("quit").wait()
,
getCanvas("confirmation").remove()
,
getScale("quit").test.selected("Yes")
.success(
clear()
,
SendResults()
)
)
.print("right at 98vw","bottom at 98vh")
)
newTrial( "welcome" , newButton("Start").print().wait() ).noHeader()
Template( "myTable",
row => newTrial( newButton(row.Text).print().wait() )
)
Let me know if this solved your timer issue too
Jeremy