Thought this might be a good topic since I couldn’t find it on the forum.
Here’s what I’m trying to do since the notation is a little confusing
- delete a row/rows from tableT1 (lines 1-5) (this code works)
- take the deleted row/rows from the tableT1 and add them to the data on tableT2 which is on a different popup window (rest of code)(error)
table = event.source.parent.getComponent("TableT1") data = table.data selected = table.selectedRows newData = system.dataset.deleteRows(data, selected) table.data = newData table2 = system.gui.getWindow("T2T3T1 Popups/T2 Popup").rootContainer.getComponent("TableT2") data2 = table2.data newData2 = system.dataset.addRows(data2,selected) table2.data = newData2 system.gui.getWindow("T2T3T1 Popups/T2 Popup").rootContainer.getComponent("TableT2").data = newData2
There are two problems with the second half of the code
- If I don’t have the pop-up folder expanded in designer it throws TypeError: Window : T2T3T1 Popups/T2 Popup is not open. I can get past this by just opening up the folder.
2: For line 12 or TypeError: addRows(): 2nd arg can’t be coerced to org.python.cogsre.PySequence
I don’t know what coerced means, but the way i understand the addRows function works is addRows(dataset, int (default bottom), PySequence). both tables have same number of columns with the same headers
Much Thanks in advance