Thread Previous • Date Previous • Date Next • Thread Next |
Seems seems is the static declaration creating this issue, probably due optimization reason. Dick is the bug reproducible also under Linux ? -- Marco Index: build_BOM.cpp =================================================================== --- build_BOM.cpp (revision 1837) +++ build_BOM.cpp (working copy) @@ -515,7 +515,7 @@ /*******************************************************************************************/ { // @todo make this variable length - static const wxCheckBox* FieldListCtrl[] = { + const wxCheckBox* FieldListCtrl[] = { m_AddField1, m_AddField2, m_AddField3,
The array is being built upon entry to the block by assembling pointers from the current dialog instance. The static can not be correct because it would mean that the array is initialized before the program is even started, and before the dialog instance is even created. I don't think the code before your patch should have worked even on the first time.
In fact, I would have hoped for a compiler error. Static const is a nice construct when you have constant data known ahead of time. In this case the initializers are not know ahead of time.
The patch seems to have been committed and that is good. I did not have time to run it on Linux.
Dick
Thread Previous • Date Previous • Date Next • Thread Next |