Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: eranon on October 30, 2012, 07:47:14 pm

Title: wxSmith started to miss a separator between two parameters of wxFilePickerCtrl()
Post by: eranon on October 30, 2012, 07:47:14 pm
Hello.

I was with C::B SVN 8466 on a project built against wxWidgets 2.9.3 (keeping wx_2.8 compatibility flag) under Windows 7. Yesterday, I've updated to 2.9.4 (compiling-it without 2.8 compatibility). Then I've loaded my project in C::B and rebuilt-it for checking : all sounded right !

But, today, I've gone through wxSmith to add an event handler. The handler has been well added but I suppose wxSmith rewrites everything at every change... From this point my program started to failed to compile !

It says :
Quote
no matching function for call to 'wxFilePickerCtrl::wxFilePickerCtrl(wxPanel*&, const long int&, const wxChar*&, const wchar_t [7]...

And, effectively, my code, now, looks like :
Code
pckImg = new wxFilePickerCtrl(Panel1, ID_FILEPICKERCTRL1, wxEmptyString _("Select a file")...

As you can see, a "," is missing between the 3rd and 4th parameter. If I add it manually, it compiles successfully, but at every use of wxSmith this "," is removed again :(

So, I've updated C::B to the last nightly build (SVN 8476) and it remains the same.
Title: Re: wxSmith started to miss a separator between two parameters of wxFilePickerCtrl()
Post by: Alpha on October 30, 2012, 10:09:10 pm
Try this patch:
Code
Index: src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsfilepickerctrl.cpp
===================================================================
--- src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsfilepickerctrl.cpp (revision 8489)
+++ src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsfilepickerctrl.cpp (working copy)
@@ -75,7 +75,7 @@
         case wxsCPP:
         {
             AddHeader(_T("<wx/filepicker.h>"),GetInfo().ClassName,0);
-            Codef(_T("%C(%W, %I, %n %t, %n, %P, %S, %T, %V, %N);\n"), m_sPath.wx_str(), m_sMessage.wx_str(), m_sWildcard.wx_str());
+            Codef(_T("%C(%W, %I, %n, %t, %n, %P, %S, %T, %V, %N);\n"), m_sPath.wx_str(), m_sMessage.wx_str(), m_sWildcard.wx_str());
             BuildSetupWindowCode();
             return;
         }
Title: Re: wxSmith started to miss a separator between two parameters of wxFilePickerCtrl()
Post by: MortenMacFly on October 31, 2012, 06:47:04 am
Code
pckImg = new wxFilePickerCtrl(Panel1, ID_FILEPICKERCTRL1, wxEmptyString _("Select a file")...
As you can see, a "," is missing between the 3rd and 4th parameter.
Strange nobody noticed before.

Try this patch:
Good catch, Alpha - applied in SVN.

The next nightly should have that fixed. Thanks for reporting.
Title: Re: wxSmith started to miss a separator between two parameters of wxFilePickerCtrl()
Post by: eranon on October 31, 2012, 12:42:57 pm
Strange, effectively, Morten, but there's always a first one ;D Thanks for pointing responsible line of code, Alpha ;) On my side I'll wait for next nightly build ; no time to apply patch then build by myself, since I'm on two projects with deadline at the end of the year (to code/write, to eat, to sleep is my current life) :-\