No. A pointer in itself is safe, the question is when the instance of the class gets created. If you do it in OnInit(), it's fine.Is it possible, that my global pointer to Frame can cause the crash?
How to build standalone wxWidgets application
Re: How to build standalone wxWidgets application
For completeness sake:
Use the source, Luke!
Re: How to build standalone wxWidgets application
Thank you. Can you give any information on my "fix"?
Apparently there ware a few optimization bugs in wxWidgets headers, but they were fixed some time ago?EDIT: I MANAGED TO "FIX" IT. I don't know if it's fixed, but it stopped crashing. In CodeBlocks went to build options and unchecked "Optimize even more" (4th flag under Optimization).
Re: How to build standalone wxWidgets application
Not really. But if compiler optimization was the root of the problem, it would have been a bug in the compiler, not wxWidgets.Can you give any information on my "fix"?
Use the source, Luke!
Re: How to build standalone wxWidgets application
I think I may have found a possible bug in my app. Let me know what you think.
I realized I don't have function, and its implementation.
I don't remember deleting it, but maybe I did it because with it, the X button (Close application) in upper right corner of application didn't work. Without it, X works fine.
Is this possible?
I realized I don't have
Code: Select all
void OnClose(wxCloseEvent& event);
I don't remember deleting it, but maybe I did it because with it, the X button (Close application) in upper right corner of application didn't work. Without it, X works fine.
Is this possible?
Re: How to build standalone wxWidgets application
The default behavior of a wxFrame is to destroy itself when it's closed. But if you override that by catching the close event, you're responsible for what happens. Usually you just have to call event.Skip() inside the close event handler, so that the default behavior is still executed. In that case you must not delete the frame yourself.
Use the source, Luke!