⚠ This website is the beta version of the PCIbex documentation and is still under development. ⚠
Link Search Menu Expand Document

(PennController.)AddTable

syntax

(PennController.)AddTable(“id”, csv_string)

What does (PennController.) mean?

description

Defines a table to use with PennController.Template. As of PennController beta 0.4, you can directly upload a CSV file to the Resources or chunk_includes folders.


example

AddTable( "myTable",             // Name of the table
    "Type,Sentence\n"+           // Column names (mind the \n)
    "practice,Hello world!\n"+   // First row (mind the \n)
    "test,Bye world!"            // Second row
);

Template( "myTable" , row => 
    newTrial(
        newText("type", row.Type)
            .print()
        ,
        newButton("sentence", row.Sentence)
            .print()
            .wait()
    )
);