Page 1 of 1

Code generation with CL+wxFB

Posted: Tue Oct 26, 2010 12:40 am
by slamjam
Hi
I am trying out CL and wxFB. Using Ubuntu 9.10 (karmic), CL ver 2.7.0.4375 and wxFB ver 3.1.70(Unicode).
I have a problem with the Code Generation of CL.

Here is what I have tried and was unsuccessful:
  • I use the CL Wizard to create a new wxFB Dialog project by right clicking the Workspace->Create New Project option.
    I then check that the project created compiles and runs with no errors and that is working correctly. CL generates a few files such as gui.fbp, main.cpp/h and gui.cpp/h.
    I then open the wxFB file "gui.fbp" that CL wizard creates and then add a wxSpinCtrl item to the gui.
    I hit F8 to generate a new base class and then recompile my code in CL and make sure that the new wxSpinCtrl is showing up correctly and that works with no errors.
    In wxFB I select the wxSpinCtrl item and then add "OnSpin1" to the event tab under "OnSpinCtrl" and then hit F8 to regenerate the base class and once again check that everything compiles correctly.
    In CL, I select the file "main.h" and then right click and select Code Generation/Refactoring->Implement Inherited virtual Functions... it does not do anything and no changes to the files "main.h" or "main.cpp" occur.
    I have tested the other options "Implement Inherited pure virtual Functions..." and "Implement all Un-implemented Functions..." and "Add Function implementation..." and none of them change any of the files or show any changes that may be made.
What could I be doing incorrectly?

Re: Code generation with CL+wxFB

Posted: Tue Oct 26, 2010 8:38 am
by eranif
slamjam wrote:I select the file "main.h" and then right click and select Code Generation/Refactoring->Implement Inherited virtual Functions... it does not do anything and no changes to the files "main.h" or "main.cpp" occur
This is because codelite is not aware that that files were modified outside of the editor.
So it does not really know about the new functions added to the base class.

From the main menu:
'Workspace | ReTag Workspace (Quick)'
This will trigger a re-parsing of all modified files (based on the modification time on the disk)

And the refactoing options will work (this is how I do it)

Eran

Re: Code generation with CL+wxFB

Posted: Sun Oct 31, 2010 12:33 am
by slamjam
Hi Eran

Thanks for the reply.

I tried both methods of retagging (Quick and Full) and it made no difference.

Re: Code generation with CL+wxFB

Posted: Sun Oct 31, 2010 9:11 am
by eranif
Make sure that the when you right click and select the option to generate the inherited methods the cursor is placed inside the derived class
Can you compress your project and attach it (assuming that it does not contain any closed sources etc ;) )

Eran

Re: Code generation with CL+wxFB

Posted: Tue Nov 02, 2010 11:37 am
by slamjam
Hi Eran

Attached is the test project Test6.tar.gz that I am using.

Re: Code generation with CL+wxFB

Posted: Fri Nov 05, 2010 2:46 pm
by slamjam
Bump

Re: Code generation with CL+wxFB

Posted: Tue Nov 16, 2010 11:50 am
by evstevemd
After generating files with wxFB, add them manually to the project!
That is how I do it ;)