Code:
srcData = event.source.parent.getComponent(‘Table’).data # sourceData
headers = [‘name’, ‘bgcolorMap’, ‘bgcolorMapColumn’, ‘dateFormat’, ‘editable’, ‘fgcolorMap’, ‘fgcolorMapColumn’, ‘fontMap’, ‘fontMapColumn’, ‘headerAlignment’, ‘hidden’, ‘hideTextOverProgressbar’, ‘horizontalAlignment’, ‘imageMap’, ‘imageMapColumn’, ‘label’, ‘locale’, ‘numberFormat’, ‘prefix’, ‘progressBackground’, ‘progressForeground’, ‘progressRange’, ‘sortable’, ‘suffix’, ‘translateMap’, ‘translateMapColumn’, ‘treatAsBoolean’, ‘treatAsProgressBar’, ‘verticalAlignment’, ‘width’]
rows = []
new_c_a_ds = system.dataset.toDataSet(headers, rows)
color = system.gui.color(255, 255, 255)
newRow = [“ID”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, color, color , “”, “”, “”, “”, “”, “”, “”, “”, “”,]
new_c_a_ds = system.dataset.addRow(new_c_a_ds, newRow)
event.source.parent.getComponent(‘Table’).columnAttributesData = new_c_a_ds
This code fails with: “[Fatal Error] :1:1: Premature end of file.”
If I replace the ‘color’ variable with a string “255,255,255” I get the same error.
If I replace the ‘color’ variable with an empty string “” I get an error : Cannot coerce string value “” into a color
Not sure what to try next.
Thanks
Ross