Search found 45 matches

by Nucleorion
Tue Feb 28, 2017 3:41 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 7136

Re: Multilingual application

Thank you very much!
by Nucleorion
Wed Feb 22, 2017 6:55 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 7136

Re: Multilingual application

Thk for all :)

Finally I extract text setting _ how keyword for _("My text") and setting ‪xgettext --force-po -o %o %C %K %F in order for extraction.

I have already translated strings and I have created .po and .mo files.

But how do I now for the user to choose one language or another?
by Nucleorion
Mon Feb 20, 2017 6:46 pm
Forum: C++ Development
Topic: wxFileConfig complete example for save and load settings
Replies: 7
Views: 3392

Re: wxFileConfig complete example for save and load settings

For portable program we need add three lines in cpp before: ConfigINI->SetPath("/settings"); //Create wxFileName Class and assign complete exe path wxFileName f(wxStandardPaths::Get().GetExecutablePath()); //Obtain only folder path of exe an add filename and store in appPath wxString appPath(f.GetPa...
by Nucleorion
Mon Feb 20, 2017 2:46 pm
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 7136

Re: Multilingual application

Yes, I have _("Button") texts and tags of controls are generated with _() for codeblocks and wxwidgets. I put .po and .mo files together .cpp files but I dont fill .po file, Only I have header. en_US.po msgid "" msgstr "" "Project-Id-Version: rf2pl\n" "POT-Creation-Date: 2017-02-17 10:57+0100\n" "PO...
by Nucleorion
Fri Feb 17, 2017 10:29 am
Forum: C++ Development
Topic: Multilingual application
Replies: 42
Views: 7136

Multilingual application

Any tutorial for implement multilinguan function.

I try with poedit follow this tutorial:
http://www.gsy-design.com/how-to-genera ... ng-poedit/

But they no find any string

I try also change parameter according to the page:
https://wiki.wxwidgets.org/Internationalization

thanks
by Nucleorion
Thu Feb 16, 2017 8:20 pm
Forum: C++ Development
Topic: wxFileConfig complete example for save and load settings
Replies: 7
Views: 3392

Re: wxFileConfig complete example for save and load settings

Example for load and save setting on .ini file We edit .ini file: [settings] CurrentProfile=player2 Folder=E:\\mypath [options] GameFire=false internet=false ShareSettings=true We put headers in Frame.h #include <wx/stdpaths.h> #include <wx/config.h> #include <wx/confbase.h> #include <wx/fileconf.h>...
by Nucleorion
Thu Feb 16, 2017 8:03 pm
Forum: C++ Development
Topic: wxFileConfig complete example for save and load settings
Replies: 7
Views: 3392

Re: wxFileConfig complete example for save and load settings

oK,

Finally I use:

Code: Select all

wxPathOnly(wxStandardPaths::Get().GetDataDir()) + _T("\\config.ini"));
I think this work for portable progams. Making:

Code: Select all

wxMessageBox(wxStandardPaths::Get().GetDataDir() + _T("\\config.ini"), _("Info"));

Says path of exe+/bin but they work in exe dir

Thanks for all :)
by Nucleorion
Thu Feb 16, 2017 5:25 pm
Forum: C++ Development
Topic: wxFileConfig complete example for save and load settings
Replies: 7
Views: 3392

Re: wxFileConfig complete example for save and load settings

I fix "f" but still bad work

I try:
ConfigINI->SetPath("/settings");

and
ConfigINI->SetPath("settings");
by Nucleorion
Thu Feb 16, 2017 4:56 pm
Forum: C++ Development
Topic: wxFileConfig complete example for save and load settings
Replies: 7
Views: 3392

wxFileConfig complete example for save and load settings

Sorry, I have than more hour reading doc and post but I understand partial examples what I find I edit a .ini file: [settings] CurrentProfile=player2 Folder=E:\\mypath [options] GameFire=false internet=false ShareSettings=true I put headers in Frame.h #include <wx/stdpaths.h> #include <wx/config.h> ...
by Nucleorion
Thu Feb 16, 2017 10:37 am
Forum: C++ Development
Topic: Call an event function from the code. For ex. OnButton1Click
Replies: 2
Views: 491

Call an event function from the code. For ex. OnButton1Click

I have an event function created for a button and I want to call it from the code. I try: aplicationFrame::OnBoton1Click(); // y OnBoton1Click(); // And putting in parentheses wxEVT_BUTTON aplicationFrame::OnBoton1Click(wxEVT_BUTTON); How can I call an event function created by the IDE, and also rec...
by Nucleorion
Thu Feb 16, 2017 10:31 am
Forum: C++ Development
Topic: RemoveLine, error index out of bounds
Replies: 5
Views: 740

Re: RemoveLine, error index out of bounds

Ops! Rebuild again. Ok.

I had to build it on another computer. At the moment I will use the code solution if you do not see any inconvenience.

Very Thaks
by Nucleorion
Thu Feb 16, 2017 10:13 am
Forum: C++ Development
Topic: RemoveLine, error index out of bounds
Replies: 5
Views: 740

Re: RemoveLine, error index out of bounds

Ah! ok. I try now :) Also I find solution for code :P wxString itemPerfil; int i; file.Open();//abre el archivo for ( itemPerfil = file.GetFirstLine(); file.GetCurrentLine()<file.GetLineCount(); i++){ if(itemPerfil==strPerfil && itemPerfil!=""){ file.RemoveLine(file.GetCurrentLine()); } if(file.GetC...
by Nucleorion
Thu Feb 16, 2017 7:43 am
Forum: C++ Development
Topic: RemoveLine, error index out of bounds
Replies: 5
Views: 740

Re: RemoveLine, error index out of bounds

Latest stable version 3.0.2

I understand what do patch http://trac.wxwidgets.org/attachment/ti ... 83.2.patch

I like modifi code for fix this problem. I'm very noob for Latest Development Release: 3.1.0
by Nucleorion
Wed Feb 15, 2017 5:00 pm
Forum: C++ Development
Topic: RemoveLine, error index out of bounds
Replies: 5
Views: 740

RemoveLine, error index out of bounds

I like remove a line of wxTextFile opened. I try: wxString strPerfil="Line of text"; wxString itemPerfil; wxTextFile file( wxT("ProfileList.txt") ); file.Open(); for ( itemPerfil = file.GetFirstLine(); !file.Eof(); itemPerfil = file.GetNextLine() ){ if(itemPerfil==strPerfil){ file.RemoveLine(file.Ge...