Search found 165 matches

by gtafan
Tue Nov 06, 2018 2:40 pm
Forum: C++ Development
Topic: wxGetApp eeror
Replies: 6
Views: 900

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: 2112

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: 2746

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: 900

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: 2112

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.
by gtafan
Mon Nov 05, 2018 11:31 am
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 2112

Re: Internationalisation

Hi, You should have a set of directories for every language you plan to support. Is this the case? Then just look at the internat sample and do what it does. Thank you. Yes I have a set of directories for every language I plan to support. But internat sample is exactly the problem I started from, I...
by gtafan
Sun Nov 04, 2018 1:52 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 2112

Re: Internationalisation

Hi, Yes - just follow the directory structure of the internat sample. Thank you. I did folowed the structure, but how to let my application use the right language now? So let say the file with translations is called translations.mo and is in the folder lang, where lang is just a placeholder for any...
by gtafan
Sun Nov 04, 2018 1:45 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 1213

Re: wxSpinCtrl problem wxSpinEvent is handled twice

Please don`t get it wrong, but your example uses 2 handler functions, which I defenetly don`t want to have. I am quite sure that the code I suggested you try, from Oct 26, does use just a single function handling wxEVT_SPINCTRL? I just need to know when the Value of SpinCtrl was updated.Is there po...
by gtafan
Fri Nov 02, 2018 2:23 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 2112

Re: Internationalisation

xaviou wrote:
gtafan wrote: What default wxTranslationsLoader can't do?
Using a "mo" file placed in the same folder than the executable itself.
It was possible with wx-2.8.x, but not since wx-3.0.x (as I remember...)
Xav'
OK, than I can place the mo file in some subfolder, so it maches.
by gtafan
Fri Nov 02, 2018 2:07 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 1213

Re: wxSpinCtrl problem wxSpinEvent is handled twice

wxEVT_SPINCTRL is old (and seems now even undocumented) alias for wxEVT_SPINCTRL. The Connect() call seems, AFAICT, allright. Did you try to run the exact code from my Oct 26 post to see if the behaviour on your configuration is the same? It the minimal example behaves correctly, the issue must be ...
by gtafan
Thu Nov 01, 2018 4:27 pm
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 2112

Re: Internationalisation

Hi. Do to this, you'll have to write your own wxTranslationsLoader as the default one can't do this. You can have a look at this application as this is what it does : it looks in the same folder as the executable to see if a file named "language.mo" is present, and use it if it is the case. Regards...
by gtafan
Thu Nov 01, 2018 4:21 pm
Forum: C++ Development
Topic: wxSpinCtrl problem wxSpinEvent is handled twice
Replies: 18
Views: 1213

Re: wxSpinCtrl problem wxSpinEvent is handled twice

1. At least on MSW, when you use wxMessageBox directly in the handler, you definitely get two events, for reasons explained by doublemax. 2. If you modifiy the value by typing it and not using arrows, you do not get wxEVT_SPINCTRL event until the control loses focus. You get wxEVT_TEXT as the chara...
by gtafan
Wed Oct 31, 2018 11:50 am
Forum: C++ Development
Topic: Internationalisation
Replies: 22
Views: 2112

Internationalisation

I took a look at the internationalisation sample, but it´s a bit complicated and confusing. I have mo file in the same directory as the applicaton, how can I tell the application to use that mo file?
by gtafan
Wed Oct 31, 2018 11:44 am
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 2746

Re: wxThread Kill()

OK, took an other look at the sample, but still have some problems to understand how that Wait stuff worcks. Wait() is executed on some semaphor, but how that semaphor is conected to the threads is not really clear.
by gtafan
Mon Oct 29, 2018 12:56 pm
Forum: C++ Development
Topic: wxThread Kill()
Replies: 48
Views: 2746

Re: wxThread Kill()

As ONEEYEMAN said, the wx'doc is clear about using Kill(): dangerous . This is due to it's a direct call to OS to "murder" the process, instead of let it die on its own. Think of it like finishing an app with the MSW Task Manager or Linux "kill" command. A short description on wxThread: Two types: ...