News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

wxSmith Error since rev 3850

Started by Martin K., September 20, 2012, 12:48:57 PM

Previous topic - Next topic

Martin K.

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

Jenna

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.

Martin K.

Hi,

This type off diff:


--- /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

Jenna

The issues should be fixed in trunk.