News:

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

Main Menu

wxSmith - indicating a validator for a wxSpinCtrl does nothing

Started by eranon, August 12, 2013, 05:07:35 PM

Previous topic - Next topic

eranon

Hello. wxSmith provides a validator field in its properties grid about a wxSpinCtrl, but when you enter one, it does nothing (not any change in the generated code)...

And effectively, from what I've seen, wxSmith is used to use the validator parameter in the control ctor. But, the wxSpinCtrl ctor doesn't provide any parameter for this. So, to associate a validator, we have to set the validator afterward like this in my dialog ctor :

m_nSpin1 = 10;
pSpinCtrl1->SetValidator(wxGenericValidator(&m_nSpin1));


Well, maybe it would be better to remove the validator field :( or generate the additional line of code :) for the controls which do not allow to pass a validator at contructor time.

Just my two cents
[Independent dev. - wxWidgets 3.0.0 under "Win 7 Pro 64-bit, C::B SVN 9435 & wxSmith, TDM64-GCC 4.7 & MSVC9" + "OS X 10.8, FSF GCC 4.7 & C::B SVN 8909"]