Author Topic: What's the best pratice about C::B and wxFormBuilder ?  (Read 4277 times)

Offline eranon

  • Almost regular
  • **
  • Posts: 180
What's the best pratice about C::B and wxFormBuilder ?
« on: May 11, 2012, 06:37:24 pm »
After trying wxSmith, I've decided to take a try w/ FormBuilder. So, I've searched a little bit but doesn't found clear info about way to integrate w/ C::B and best practices in dev cycle. So, here are my questions :

- After wxFormBuilder Install, I suppose I have to declare-it as tool in Code::Blocks. Is that right ? If yes, what to provide in the "User-defined Tools" fields ? If no, what's the good method ?

- What's the practices guideline between C::B and wxFB to separate auto-generated code and manually implemented one ? At beginning, should I create an empty project, then manually add the files created in wxFB ? Or should I generate the wxFB based project as indicated in Project Wizard ? After this first/initial generation, should I derive my own class from the wxFB generated one(s) to isolate auto-generated files (nad never add anything manualy in them) ? And, in this same will of separation auto-generated/hand-made, does XRC matter (knowing I don't know anything about them) ?

Well, so is there a tutorial about C::B/wxFB together ?
« Last Edit: May 11, 2012, 09:30:40 pm by eanon »
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: What's the best pratice about C::B and wxFormBuilder ?
« Reply #1 on: May 11, 2012, 09:29:26 pm »
- After wxFormBuilder Install, I suppose I have to declare-it as tool in Code::Blocks. Is that right ? If yes, what to provide in the "User-defined Tools" fields ? If no, what's the good method ?
I would do it as following:
- setup wxFormBuilder as tool (leave any fields you don't know as empty)
- create your wxFormBuilder resources
- name them something like dialog_base
- add those CPP/H files to your project
- implement whats' needed in addition in another class deriving from dialog_base, namely dialog
- add those CPP/H files to your project
- add the FBP file to the C::b project
- add the extension to C::B's MIME handler so it opens up wxFormBuilder automatically if you open it

BTW: I never missed anything in wxSmith that wxFormBuilder offers. Surely you have the freedom of choice but I believe using C::B it is more intuitive to to wx development with wxSmith.
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 eranon

  • Almost regular
  • **
  • Posts: 180
Re: What's the best pratice about C::B and wxFormBuilder ?
« Reply #2 on: May 11, 2012, 09:34:07 pm »
Hey, I just edited my previous post and seen your reply after... So, I delete this edit and copy/paste it below... You'll see I've came to same conclusion as yours, MortenMacFly : integration is unvaluable !

My edit was :
--
Well, just tried on a quick test project and... hmm, at this stage, I prefer wxSmith because of its close integration with C::B (and also because of look n' feel ; I prefer sobriety).
--

Also, thanks for your described process : it help me to figure out the way C::B works, whatever be the GUI-builder.
« Last Edit: May 11, 2012, 09:39:34 pm by eanon »
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]