User forums > Using Code::Blocks
wxSmith/wxGrid incompatibility with wx3.1 wxEVT_GRID_CELL_CHANGE(D)
cacb:
I have discovered an incompatibility with wxWidgets 3.1 when generating wxGrid controls and using wxEVT_GRID_CELL_CHANGE event. Apparently, this event ID does not exist anymore, I think it should be wxEVT_GRID_CELL_CHANGED (notice the 'D' at the end)
If it matters, I am using C::B rev 10376 on Windows
oBFusCATed:
Can you try the latest night build and report if the problem is still happening?
cacb:
--- Quote from: oBFusCATed on January 19, 2017, 06:54:29 pm ---Can you try the latest night build and report if the problem is still happening?
--- End quote ---
I have just tried with rev 10922 "The 20 November 2016 build (10922)" and the problem is still the same. It looks like this ID has been discouraged for quite some time (deprecated?) and in wx3.1 it is gone. It is a problem when wxSmith still uses the now non-existent ID.
As a temporary work around I had to add in my code
#define wxEVT_GRID_CELL_CHANGE wxEVT_GRID_CELL_CHANGED
So, yes it is still a problem.
stahta01:
From wxWidgets master branch; file grid.h.
--- Code: ---// we used to have a single wxEVT_GRID_CELL_CHANGE event but it was split into
// wxEVT_GRID_CELL_CHANGING and CHANGED ones in wx 2.9.0, however the CHANGED
// is basically the same as the old CHANGE event so we keep the name for
// compatibility
#if WXWIN_COMPATIBILITY_2_8
#define wxEVT_GRID_CELL_CHANGE wxEVT_GRID_CELL_CHANGED
#define EVT_GRID_CMD_CELL_CHANGE EVT_GRID_CMD_CELL_CHANGED
#define EVT_GRID_CELL_CHANGE EVT_GRID_CELL_CHANGED
#endif // WXWIN_COMPATIBILITY_2_8
--- End code ---
Tim S.
oBFusCATed:
Someone should teach wxsmith to generate the event with a condition - the old event for 2.8 and the new event for 3.x. Patches welcome. wxsgrid.cpp should be the starting point for the patch generation.
Navigation
[0] Message Index
[#] Next page
Go to full version