Reply To: Exit button

PennController for IBEX Forums Support Exit button Reply To: Exit button

#5684
Jeremy
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