Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

wxSmith - validators everywhere, maybe...

<< < (2/4) > >>

MortenMacFly:
From having a quick comparison between wxsFontPickerCtrl and wxsColourPickerCtrl I can say the reason is clear:

--- Code: ---wxsFontPickerCtrl::wxsFontPickerCtrl(wxsItemResData* Data):
    wxsWidget(
        Data,
        &Reg.Info,
        wxsFontPickerCtrlEvents,
        wxsFontPickerCtrlStyles,
        flVariable | flId | flPosition | flSize | flEnabled | flFocused | flHidden | flColours  | flToolTip | flHelpText | flSubclass | flMinMaxSize | flExtraCode)
{}

--- End code ---
vs.:

--- Code: ---wxsColourPickerCtrl::wxsColourPickerCtrl(wxsItemResData* Data):
    wxsWidget(
        Data,
        &Reg.Info,
        wxsColourPickerCtrlEvents,
        wxsColourPickerCtrlStyles),
        m_cdColour(*wxBLACK)
{}

--- End code ---
shows that wxsFontPickerCtrl uses special flags which hides the validator flag and is actually most likely not what was intended. I wonder why this is the case (I didn't implement it).

Just adding (OR'ing) "flValidator" to this list should make it work, but requires you to build wxSmith yourself. However, I think a better way is to use the default flags and add what's needed in addition. For clarification: Usually, if you declare flags like that you want to add some non-default flags, but might also want to hide some default flags. I don't know what applies to wxsFontPickerCtrl to be honest... anybody?

MortenMacFly:
...btw: The only controls that do such "hocus-pocus" are wxsFontPickerCtrl, wxsRichTextCtrl and wxsSimpleHtmlListBox. I think in all three cases the right solution is to remove those flags all-together from their implementation and therefore having applied the default flags. I don't see why this should be wrong, because from the list of flags they map the list of default flags except the validation. Nevertheless I believe all of these can have a validator... need to check with wxWidgets docs though... So I think this is a bug.

eranon:
Thanks for this analysis which save me from headhache ???, Morten ! So, maybe it would be cool to submit a bug report towards the wxSmith's author (Byo, if I've well understood from others threads I've read)...

By the way, what's the official place to download the wxSmith's source code ? Is it this one : http://sourceforge.net/scm/?type=svn&group_id=320287 ?

MortenMacFly:

--- Quote from: eanon on August 20, 2012, 05:25:23 pm ---So, maybe it would be cool to submit a bug report towards the wxSmith's author (Byo, if I've well understood from others threads I've read)...
--- End quote ---
Byo is no longer active, I'm afraid. Also, I believe these additions came from another developer.


--- Quote from: eanon on August 20, 2012, 05:25:23 pm ---So, maybe it would be cool to submit a bug report By the way, what's the official place to download the wxSmith's source code ? Is it this one : http://sourceforge.net/scm/?type=svn&group_id=320287 ?

--- End quote ---
Nope, they are integrated into C::B's core SVN repository (http://svn.berlios.de/wsvn/codeblocks/?op=log&rev=0&sc=0&isdir=1). Just the one you use when you want to tom compile C::B yourself.

What I can offer - if you are willing t': If you give the modifications I described a try and report back if its working, I can commit these changes into SVN.

eranon:
Oh ! oops... So, does it means future wxSmith will be taken in charge by the main C::B dev. team ? Hoping it will be not "abandonned".


--- Quote ---If you give the modifications I described a try and report back if its working
--- End quote ---
Not sure what you mean, Morten (remember I'm French and can miss some English subtleties - lol) : do you wish I add "flValidator" in the wxSmith source, then rebuild the DLL and try if it works ? Or do you prefer to send me a patched DLL directly ?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version