News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Move wxSmith dialog files

Started by tigerbeard, July 15, 2012, 01:56:56 PM

Previous topic - Next topic

tigerbeard

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




MortenMacFly

Quote from: tigerbeard on July 15, 2012, 01:56:56 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.

Quote from: tigerbeard on July 15, 2012, 01:56:56 PM
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

tigerbeard

Thanks a lot for the info and keep up the good work.

Topic closed.