Hi,
I am playing around with wxPropertyGrid and possibly found a bug which leads to a segmenation fault if compiled with gcc under Ubuntu 9.04.
I tried to track down the problem in my program and attached a small demo which demonstrates the problem. If you replace the wxPropertyGird by any other widget (uncomment the line below to insert a button) the program works fine. Is there a problem with reparenting? The reparenting itself works fine but it looks like there is a problem with cleaning up the frames when MyApp terminates. Of course after reparenting one could (should?) clean up "parent" since it is no longer used but this doesn't change the situation. I would be very thankful to get the problem solved. Please don't hesitate contacting me in cas of further questions.
BTW: I need this (somehow strange) construction to set up a prototype of a panel which is cloned later on and then attached to a real parent....
Udo
produces segfault at program exit
I've implemented top-level parent hooking a bit differently now in SVN trunk. wxPG should now survive indirect re-parenting, as done in your sample, but will report an error at the end. To avoid this, you should call wxPropertyGrid::OnTLPChanging(newTLP) just before you re-parent. This is needed since AFAIK there is no way for wx to communicate exactly when a window is re-parented .
Let me know how it works for you.
Thanks,
Jaakko
Hi,
Thank you very much for your fast response! I will try it out. Is this new version also in the current "daily snapshot" of wxWidgets 2.9 or only in a separate PropGrid trunk?
Thanks,
Udo
Naturally, as with everything else in wxPG 1.4 branch, I will port this fix/feature into wxWidgets 2.9 SVN trunk. In fact I would already have done that if wx servers had not been down for a while now ;)
Hi,
I tried it and it seems to work fine or me. Thank you again for the fast solution.
Udo