When I am triing to use wxGetApp() in my application, for example in the constructor of MyFrame, which is the frame class, I am geting this error mesage:
error: 'wxGetApp' was not declared in this scope
wxGetApp eeror Topic is solved
Re: wxGetApp eeror
You need to use the DECLARE_APP(YourAppName) where ever you want to use the wxGetApp macro.
Note that if you only need to access the base methods and not methods of the derived class, you can use the global wxTheApp pointer.
Note that if you only need to access the base methods and not methods of the derived class, you can use the global wxTheApp pointer.
Use the source, Luke!
Re: wxGetApp eeror
Thanks a lot, this is the problem with code snipets from the net, some information was mising there, but now I know.doublemax wrote:You need to use the DECLARE_APP(YourAppName) where ever you want to use the wxGetApp macro.
Note that if you only need to access the base methods and not methods of the derived class, you can use the global wxTheApp pointer.
Re: wxGetApp eeror
Hi,
Always!! check the sample first, before going to the web to search for the answer.
Thank you.
Always!! check the sample first, before going to the web to search for the answer.
Thank you.
Re: wxGetApp eeror
Which sample? I was tallking about code snipet not related to samples.ONEEYEMAN wrote:Hi,
Always!! check the sample first, before going to the web to search for the answer.
Thank you.
Re: wxGetApp eeror
Hi,
Usually people start with minimal sample.
But in general - if you know what you are looking for, you go to the documentation first, then the sample, and only then go to search the web (Google).
That should be the standard course of actions for every issue related to wxWidgets.
Thank you.
Usually people start with minimal sample.
But in general - if you know what you are looking for, you go to the documentation first, then the sample, and only then go to search the web (Google).
That should be the standard course of actions for every issue related to wxWidgets.
Thank you.
Re: wxGetApp eeror
I agree about documentation, but samples are not of relly use for people with low wxWidgets knowledge. For simple things documentation is enough and for complicated things the samples are to complicated, that internationalization sample is the best example.ONEEYEMAN wrote:Hi,
Usually people start with minimal sample.
But in general - if you know what you are looking for, you go to the documentation first, then the sample, and only then go to search the web (Google).
That should be the standard course of actions for every issue related to wxWidgets.
Thank you.