PennController.AddTableGlobal Commands

PennController.AddTable( name, csv_string )

You can use this command to manually define a table to use with Template. You normally do not need to use this command since, as of PennController beta 0.4, you can directly upload your CSV file under Resources / chunk_includes.


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 => 
        newText("type", row.Type)
        newButton("sentence", row.Sentence)