Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: eranon on May 11, 2012, 06:37:24 pm

Title: What's the best pratice about C::B and wxFormBuilder ?
Post by: eranon 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 ?
Title: Re: What's the best pratice about C::B and wxFormBuilder ?
Post by: MortenMacFly 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.
Title: Re: What's the best pratice about C::B and wxFormBuilder ?
Post by: eranon 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.