Reply To: Getting variable from csv, based on DropDown selections

PennController for IBEX Forums Support Getting variable from csv, based on DropDown selections Reply To: Getting variable from csv, based on DropDown selections

#8315
Jeremy
Keymaster

Hi,

You could print the image onto a Canvas element, and manipulate that one Canvas element instead—I don’t think there’s anything you can do on an Image element you cannot do on a Canvas element:

Template("fullList.csv",
    variable => newTrial("demo",
        newText("head", " ")
            .text(getVar("asdf"))
            .before(newText("b","").text(getVar("namelist")).after(newText(": ")))
            .center()
            .print()
        ,
        newCanvas("image").center().print()
        ,
        getVar("namelist")
            .test.is("P1A").success( newImage(variable.P1A).print(getCanvas("image")) )
            .test.is("P1B").success( newImage(variable.P1B).print(getCanvas("image")) )
            .test.is("P1C").success( newImage(variable.P1C).print(getCanvas("image")) )
            .test.is("P2A").success( newImage(variable.P2A).print(getCanvas("image")) )
            .test.is("P2B").success( newImage(variable.P2B).print(getCanvas("image")) )
            .test.is("P2C").success( newImage(variable.P2C).print(getCanvas("image")) )
            .test.is("P3A").success( newImage(variable.P3A).print(getCanvas("image")) )
            .test.is("P3B").success( newImage(variable.P3B).print(getCanvas("image")) )
            .test.is("P3C").success( newImage(variable.P3C).print(getCanvas("image")) )
        ,
        newButton("Flicker")
            .center()
            .print()
            .wait()
            .remove()
        ,
        getCanvas("image").remove()
        ,
        newTimer(2000).start().wait()
        ,
        getCanvas("image").print()
        ,
        newButton("Finish").center().print().wait()
    )
)

Jeremy