Search found 145 matches

by gtafan
Fri Nov 09, 2018 4:04 pm
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 1812

Re: wxThread Kill()

Hi, Can you do the calculation on timer? Or this calculation absolutely have to be done in background and your program will use the results of the calculation even in the middle of the processing? Thank you. P.S.: What I mean is this: Let's say you thread will add the number 2 to the parameter, lik...
by gtafan
Fri Nov 09, 2018 1:34 pm
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 1812

Re: wxThread Kill()

If you have only one joinable thread, and you must wait until it finishes, how is this different from not using threads at all? IMHO, joinable threads may be useful if you fire several at once. I consider this case as a way to speed up tasks that can be parallelized, and the app can't continue unti...
by gtafan
Fri Nov 09, 2018 12:59 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

After hours of reading documentation and triing diferent stuff, looks like I finaly solve the problem: wxTranslations *t=new wxTranslations(); t->SetLanguage(lng); wxLocale::AddCatalogLookupPathPrefix("."); t->AddCatalog("translations"); wxTranslations::Set(t); lng is the int value of the language. ...
by gtafan
Fri Nov 09, 2018 11:50 am
Forum: C++ Development
Topic: wxGetApp eeror
Replies: 6
Views: 644

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. I agre...
by gtafan
Fri Nov 09, 2018 11:47 am
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

ONEEYEMAN wrote:Hi,
Out of curiosity - is you program build in Debug or Release mode?

Thank you.
Release, what else. Always using Release only.
by gtafan
Fri Nov 09, 2018 11:45 am
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 1812

Re: wxThread Kill()

My thread alocates no resorces, that should be freed and it make sence for the frame to wait for the thread to be terminated befor the frame is destoied. I was thinking to have something like that inside MyFrame class: MyThread thread; then in the constructor of MyFrame I have to call: thread.Run();...
by gtafan
Thu Nov 08, 2018 3:08 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

Hi, This is a complete failure on your side. Especially if you just starting - always start with the debug build. Now you will have to waste extra time and create a debug build of the library. Thank you. Not going to create that debug stuff, as it´s complete useles for me. It´s easier to write my o...
by gtafan
Thu Nov 08, 2018 3:03 pm
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 1812

Re: wxThread Kill()

If I understood you correctly, you want to have a second thread running, which should only be closed if your main programm is about to close. So you need a detached wxThread, or else (in the case of joinable) your main thread would wait for your sub thread to complete, which is never going to happe...
by gtafan
Wed Nov 07, 2018 12:56 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

ONEEYEMAN wrote:Hi,
Run the samplpe thru the debugger and see where it is initialized.

Thank you.
Sory, but this makes everything even more complicated, have no idea about that debugger stuff. I din´t even have the debug version ofwxWidgets.
by gtafan
Wed Nov 07, 2018 12:49 pm
Forum: C++ Development
Topic: wxGetApp eeror
Replies: 6
Views: 644

Re: wxGetApp eeror

ONEEYEMAN wrote:Hi,
Always!! check the sample first, before going to the web to search for the answer.

Thank you.
Which sample? I was tallking about code snipet not related to samples.
by gtafan
Tue Nov 06, 2018 2:40 pm
Forum: C++ Development
Topic: wxGetApp eeror
Replies: 6
Views: 644

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. Thanks a lot, this is the problem with code snipets from the net, some inf...
by gtafan
Tue Nov 06, 2018 2:38 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

ONEEYEMAN wrote:Hi,

Can you do that or you have trouble finding where it is being done?

Thank you.
That´s exactly what I am tallking about all the time. I need to find where it is done.
by gtafan
Mon Nov 05, 2018 4:21 pm
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 1812

Re: wxThread Kill()

On some page about wxThread is said, that calling Delete is a graceful way to terminate the thread, but there seems still to be some diference between detached and joinable threads. Also that TestDestroy, I have to call is not complete clear for me.
by gtafan
Mon Nov 05, 2018 4:11 pm
Forum: C++ Development
Topic: wxGetApp eeror
Replies: 6
Views: 644

wxGetApp eeror

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
by gtafan
Mon Nov 05, 2018 4:09 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 1355

Re: Internationalisation

ONEEYEMAN wrote:Hi,
Is the sample works?
If yes - then you should do exactly the same in your code.

Thank you.
I think you are not understanding my problem, if I do exactly the same as in the sample, I´ll get just the sample application, which is useles for me.