@cyliceaux
Bear in mind I'm using PB5.70 (5.73 is not compatible with Ubuntu 16.04 and for reasons unrelated to PB I can't upgrade yet).
Thanks for going to all this trouble, far beyond the call of duty. Especially if it turns out I've done something daft.
EDIT 1: Evidence - just from the Table1 example.
The vanilla table1 does not have the EDITABLE flag, so the table is not editable.
1. Adding only that flag causes the gridlines to disappear but I can edit the table. However as soon as I press Enter to do so, the IDE quits, just leaving the app running.
2. Also adding the default flag, so that the call looks like this:
Code: Select all
Global *table.MyTableTable=MyTableCreateTable(window,canvas,vscroll,hscroll, #MYTABLE_TABLE_FLAGS_DEFAULT_TABLE | #MYTABLE_TABLE_FLAGS_EDITABLE)
brings back the gridlines but does not affect the other behaviour.
EDIT 2: More evidence, running with the flag in and inserting a breakpoint.
I double left click in a cell in order to edit it
The breakpoint is 20 lines into MyTable_StartEditCell
on the statement
Code: Select all
*this\edit\window=OpenWindow(#PB_Any,
GadgetX(*this\canvas,#PB_Gadget_ScreenCoordinate)+*cell\startx,
GadgetY(*this\canvas,#PB_Gadget_ScreenCoordinate)+*cell\starty,
*cell\col\calcwidth,
*cell\row\calcheight,
"",
#PB_Window_BorderLess,
GadgetID(*this\canvas))
Executing this statement generates the following (text transcribed not copied so subject to typo)
Code: Select all
WARNING: Invalid cast from GtkLayout to GtkWindow
CRITICAL: gtk_window-set_transient_for:assertion'parent == NULL||GTK_IS_WINDOW(parent)' failed
but if I ignore that I find I can edit the table and close its window successfully.
Without the breakpoint, I can edit the table but the IDE quits.
So either way it looks like I can edit the table, but there is something not quite right about how Ubuntu/PB/this code are interfacing which brings down the IDE if the breakpoint is absent.
EDIT 3: Just to see what would happen, I built an executable out of Table1. It runs with no problems.
This suggests to me it is at root an issue with PB, maybe just with the IDE which ships with 5.70 ?
Perhaps there is a workaround. Any ideas?