Author Topic: Move wxSmith dialog files  (Read 4021 times)

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 190
Move wxSmith dialog files
« on: July 15, 2012, 01:56:56 pm »
Hello,

I've been using Dialog Blocks for some years in MVSCnow, but since I recently moved to C::B
For me I found that wxSmith is more efficient to use due to the great integration (it also compensates
for the more cumbersome copy/paste procedures of wxSmith).

However, during code refactoring I needed to move a wxSmith dialogs to a different place in the
source tree, while the automatic code generation should still work. I found the following:
 - there are 4 files involved: MyDialog.cpp, MyDialog.h, wxSmith/MyDialog.wxs, MyProject.cbp
 - the only link between the first three seems to be the *.cbp file, where wxSmith has an own
    section in Extensions. It gives the name of the GUI and per Dialog/Frame/Panel a line like
    <wxDialog wxs="..." src=".." hrd="..." fwddecl="0" i18n="0" name="..." language="CPP" />
 -> copying the files to whereever I want and adapting the *.cbp file works fine.

With this I could move the 3 dialog files to a single sudirectory (to a complete "dialog module") or
even to a new project altogether.
Also I found it pretty handy to be able to not start from scratch every time in wxSmith, but rather
modify a similar dialog from another project.

Although it seems to work I wonder:
 1) is that the only way to do it, or is there a GUI supported way?
 2) What is the paramter i18n=".." (can be "0" or "1")? And what happens when I set it wrong?

regards
tiger


I am using the nightly build 7966, gcc




Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Move wxSmith dialog files
« Reply #1 on: July 15, 2012, 03:12:49 pm »
1) is that the only way to do it, or is there a GUI supported way?
You did everything "correct". A GUI for such operations was planned but not (yet) implemented.

2) What is the parameter i18n=".." (can be "0" or "1")? And what happens when I set it wrong?
It corresponds to the internationalisation parameter you can choose when you add a nw wxSmith item to your project (Menu "wxSmith" -> "Add wxDialog" (for example) -> Button "Advanced options" -> Checkbox "use internationalize".

It basically defines if you are using _("") (wxTRANSLATE("")) or wxT("") for strings, where appropriate. If you want to translate your app, leave it on.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline tigerbeard

  • Almost regular
  • **
  • Posts: 190
Re: Move wxSmith dialog files
« Reply #2 on: July 15, 2012, 03:53:06 pm »
Thanks a lot for the info and keep up the good work.

Topic closed.