Author Topic: wxSmith Error since rev 3850  (Read 5372 times)

Offline Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
wxSmith Error since rev 3850
« on: September 20, 2012, 12:48:57 pm »
Hi,

I think there was an error (or two) introduced to wxSmith with Rev 3850. Is this the right place to report it?

In src\plugins\contrib\wxSmithAui\wxAuiToolBar\wxsAuiToolBar.cpp the following patch corrects this error:

356,357c356,357
<                     if ( Spacer->m_Stretch ) Codef(_T("%AAddStretchSpacer(%ld);\n"),Spacer->m_Proportion);
<                     else                     Codef(_T("%AAddSpacer(%ld);\n"),Spacer->m_Pixels);
---
>                     if ( Spacer->m_Stretch ) Codef(_T("%AAddStretchSpacer(%d);\n"),Spacer->m_Proportion);
>                     else                     Codef(_T("%AAddSpacer(%d);\n"),Spacer->m_Pixels);

I have only looked at this, since i couldn't load my wxSmith files anymore. But ist seems that the " tons of stringformat fixes to avoid asserts with wx2.9" introduced a few more problems. Not all "%d" should be changed to "%ld", some of this format strings are going to Codef and shouldn't be changed.

Martin

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith Error since rev 3850
« Reply #1 on: September 20, 2012, 12:59:33 pm »
Thanks for reporting this.
I must have overlooked some of the CodeF-format-strings, sorry for the inconvenience.
I will look into it as sonn as possible.
If you find more of them, please report it here.

But if possible use unified diff (like svn diff) and code-tags if you post here, it's easier to read.

Offline Martin K.

  • Multiple posting newcomer
  • *
  • Posts: 86
Re: wxSmith Error since rev 3850
« Reply #2 on: September 20, 2012, 01:07:08 pm »
Hi,

This type off diff:

Code
--- /cborg/cb8383/src/plugins/contrib/wxSmithAui/wxAuiToolBar/wxsAuiToolBar.cpp	Tue Sep 04 10:05:12 2012
+++ /cb8383/src/plugins/contrib/wxSmithAui/wxAuiToolBar/wxsAuiToolBar.cpp Thu Sep 20 12:32:14 2012
@@ -353,8 +353,8 @@
                 else if ( ClassName == _T("wxAuiToolBarSpacer") )
                 {
                     wxsAuiToolBarSpacer* Spacer = (wxsAuiToolBarSpacer*) Child;
-                    if ( Spacer->m_Stretch ) Codef(_T("%AAddStretchSpacer(%ld);\n"),Spacer->m_Proportion);
-                    else                     Codef(_T("%AAddSpacer(%ld);\n"),Spacer->m_Pixels);
+                    if ( Spacer->m_Stretch ) Codef(_T("%AAddStretchSpacer(%d);\n"),Spacer->m_Proportion);
+                    else                     Codef(_T("%AAddSpacer(%d);\n"),Spacer->m_Pixels);
                 }
                 else
                 {

I will remeber this next time.

Currently i have no acces to the svn repository, but i will report everything that i find later.

Martin

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: wxSmith Error since rev 3850
« Reply #3 on: September 20, 2012, 09:06:06 pm »
The issues should be fixed in trunk.