PennController for IBEX › Forums › Support › Issue Importing Images After Test.Is() › Reply To: Issue Importing Images After Test.Is()
We resolved this issue by email
The problem was coming from the assumption that newImage commands embedded in the success would only be evaluated in case of a successful test, but all new* commands are evaluated at the beginning of the experiment, even if they are embedded in a test command that will be evaluated upon runtime. One reason for this behavior is to let PennController preload the resources as soon as possible.
Template( "myTable.csv" , row => newTrial( "trial" ( row.Image.match(/png$/) ? newImage( row.Image ).print() : newText( row.Text ).print() ) , newButton("Next").print().wait() ) )