Menu

#142 3.5-0 beta doesn't generates cpp/h files from command line

v1.0_(example)
closed-fixed
nobody
None
5
2014-07-24
2014-06-13
Zaskar
No

The "-g" command line argument seems to be broken in 3.5 beta. It was working ok with a previous 3.4 version, but after updating it doesn't work anymore, nor with the same project neither with a new one. When I to run something like "wxformbuilder.exe -g my_project.fbp" from a command line nothing happens, no error message, no segfault, no source created, no output at all, and return code is 0. Tested on 3.5.0-bate(Unicode) Windows precompiled version.

Discussion

  • Alexey Elizarov

    Alexey Elizarov - 2014-07-23

    Whether this option works depends on #define USE_FLATNOTEBOOK that depends on wxWidgets version (defined for version < 2.9) used when building wxFormBuilder. The error roots in the code of ApplicationData::GenerateCode() method that is different depending on the definition of USE_FLATNOTEBOOK.

    If USE_FLATNOTEBOOK is not defined (new versions) then code generation is postponed via pending events technique. But this doesn't work when trying to generate code from command line since event handling is not enabled in this case.

    I suggest a patch to fix this error. I introduced a parameter of ApplicationData::GenerateCode() called noDelayed (bool type, default value false) that forces immediate code generation if set to true, and set this parameter to true when calling ApplicationData::GenerateCode() from command line.

    The patch applies to the SVN 3.x trunk revision 2188.

     
  • Michal Bližňák

    Patch applied. Thank you for the fix!

     
  • Michal Bližňák

    • status: open --> closed-fixed