Author Topic: Hi All, i suggested adding an option for the wxSmith.  (Read 3733 times)

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Hi All, i suggested adding an option for the wxSmith.
« on: January 18, 2016, 12:46:49 pm »
I'm Asian, Asian text in the program, the code will not compile correctly generated by the wxSmith.

For example:

   StaticText2 = new wxStaticText(Panel4, ID_STATICTEXT2, _(" ID域报文 (HEX): "), wxDefaultPosition, wxDefaultSize, wxSTATIC_BORDER, _T("ID_STATICTEXT2"));


I hope to have an option to automatically modify:

_(" ID域报文 (HEX): "),         ----》         _T(" ID域报文 (HEX): "),
« Last Edit: January 18, 2016, 12:50:37 pm by Chun Jiu »
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #1 on: January 18, 2016, 12:55:57 pm »
Only a "T" will be able to compile correctly ...

I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5217
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #2 on: January 20, 2016, 02:48:33 pm »
I'm not sure, but if you can define a macro like below. :)
Code: [Select]
#define _T T
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9488
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #3 on: January 21, 2016, 12:11:19 pm »
I hope to have an option to automatically modify:
_(" ID域报文 (HEX): "),         ----》         _T(" ID域报文 (HEX): "),
Whats wrong with search for _(" and replace with _T(" (search&replace dialog)?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7265
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #4 on: January 21, 2016, 12:56:06 pm »
I hope to have an option to automatically modify:
_(" ID域报文 (HEX): "),         ----》         _T(" ID域报文 (HEX): "),
Whats wrong with search for _(" and replace with _T(" (search&replace dialog)?
I guess it has to be done after each change to the corresponding wxs-file.
And this would be quite annoying.

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #5 on: January 21, 2016, 03:21:34 pm »
I hope to have an option to automatically modify:
_(" ID域报文 (HEX): "),         ----》         _T(" ID域报文 (HEX): "),
Whats wrong with search for _(" and replace with _T(" (search&replace dialog)?
I guess it has to be done after each change to the corresponding wxs-file.
And this would be quite annoying.

Thank you very much, guys.

Yes, after each modification must re-do a correction ..., this would be quite annoying!  :(
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9488
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #6 on: January 22, 2016, 08:28:44 am »
Yes, after each modification must re-do a correction ..., this would be quite annoying!  :(
We could do a global option that either all or none will be translatable. Doing this for each control individually is more effort.
Would a global option be fine?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #7 on: January 22, 2016, 09:56:17 am »
Yes, after each modification must re-do a correction ..., this would be quite annoying!  :(
We could do a global option that either all or none will be translatable. Doing this for each control individually is more effort.
Would a global option be fine?

I feel to be a global option can solve 50% of people's problems...  ;)

For Asia, thank you!  ;D
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9488
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #8 on: January 22, 2016, 12:07:42 pm »
We could do a global option that either all or none will be translatable. Doing this for each control individually is more effort.
Would a global option be fine?
I feel to be a global option can solve 50% of people's problems...  ;)
Done that in SVN. Await the next nightly or try to compile yourself...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #9 on: January 22, 2016, 12:17:45 pm »
We could do a global option that either all or none will be translatable. Doing this for each control individually is more effort.
Would a global option be fine?
I feel to be a global option can solve 50% of people's problems...  ;)
Done that in SVN. Await the next nightly or try to compile yourself...

Okay! Thanks, guys!  ;D
I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.

Offline Chun Jiu

  • Multiple posting newcomer
  • *
  • Posts: 43
  • My Girlfriend
    • EasilyGCC
Re: Hi All, i suggested adding an option for the wxSmith.
« Reply #10 on: January 22, 2016, 01:09:21 pm »
We could do a global option that either all or none will be translatable. Doing this for each control individually is more effort.
Would a global option be fine?
I feel to be a global option can solve 50% of people's problems...  ;)
Done that in SVN. Await the next nightly or try to compile yourself...

Tested, it worked perfectly!Thank you very much.  ;D

I love my girlfriend like c++!    :-)

http://pan.baidu.com/s/1feNwU
easilygcc is a gmail's email.