Closed jtappin closed 7 months ago
@jtappin widget_table is essentially untested so I'm not surprised (even if I could have spotted the transposition effect). I've already cured this, and will continue as I see other issues. Thanks for always providing small test procedures they help a lot.
In resurrecting some code, and trying to make it work on GDL as well as IDL, I've come across a few issues with the table widget (I should also add that my impression is that IDL doesn't actually do what the documentation says either in some cases).
Here is the basic test code that I've been using to characterize the issues: test_table.pro
The ones that I have reasonably fully characterized so far:
1) When an array is used as the initial value, the table is transposed (IDL on the left, GDL on the right):
2) Setting
/editable
without/all_events
, no events at all are returned; aWIDGET_TABLE_CH
should be returned on enter or shifting focus out of a changed cell.3) For a table with only a single row, attempting to read the value gives an undefined variable error for a table defined as an array, while a table defines by a structure gives:
along with a pop-up message repeated for each cell.
I think this is at least partially related to the first issue, as running the test program with
row=4, fill=4
gives similar errors if anything is changed, and in the array-values case only a 3x3 block is returned if the value is read before any changes.4) So far as I can see, the only event actually returned when
/all_events
is set is theWIDGET_TABLE_CELL_SEL
eventRunning latest GIT: b82c7376 (also seen on https://github.com/gnudatalanguage/gdl/commit/44a497bced2627ccf20d003cdc9b49c2ece91f27) on Manjaro Linux
There are also some funnies with empty cells that I've not yet chased into a corner (that's where I'm not sure IDL does it right either).