Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
wxSmith - validators everywhere, maybe...
eranon:
Hello. I've seen (and used) the possibility to declare a validator for some controls since last C::B SVN... Nice feature : bravo !
But would it be possible to add this possibility for all controls, giving the developer all capacity to decide if he needs to use validator or not. For example, in my case, I've derived some validators for custom controls and also ones not covered by standard validators and I can't add them through wxSmith ; I have to attach them outside of wxSmith generated code.
MortenMacFly:
--- Quote from: eanon on August 19, 2012, 10:35:25 pm ---I have to attach them outside of wxSmith generated code.
--- End quote ---
Why? The wxValidator field is just a text. So if you derived from wxTextValidator as wxMyTextValidator for example, just enter the derived class and that's it.
eranon:
Hum, yes, of course, Morten, but maybe I've poorly explained what I've in mind. OK for the derived custom controls (well understood classname is free in wxSmith). But, back on case about some standard controls for which wxSmith doesn't show a validator field : for example, I've written a validator to handle data-tranfers to/from wxFilePickerCtrl, wxFontPicker and wxColourPicker. In the case of file-picker, wxSmith displays a validator field, but not for the font and color-picker cases...
Knowing SetValidator is a wxWindow's method, don't any UI control supposed to be able to be binded with a validator ; or did I missed a point ?
MortenMacFly:
--- Quote from: eanon on August 20, 2012, 12:56:23 pm ---In the case of file-picker, wxSmith displays a validator field, but not for the font and color-picker cases...
--- End quote ---
In that case there is an issue with font- and color picker, not the validator. The validator property is a low-level property already and should therefore apply where appropriate. If you want to, you can have a look at the difference between FilePicker and the other ones to find out where the actual bug resides...
eranon:
If I can help and according to my "beginning-level" knowledge of wxWidgets, of course, I could take a look where you tell me... But, maybe, as first-step checking : do you have too a lack of wxSmith's validator field about font and color-pickers in your own Code::Blocks ? This, simply to exclude case where my config would be in/the cause.
--
EDIT : checking after posting, I realize validator field well exists about wxColourPicker (don't know why I didn't seen it before). However, I still don't see any about wxFontPicker... I double-ckeck to be sure.... [some seconds]... I confirm : I don't see validator field for wxFontPicker
Navigation
[0] Message Index
[#] Next page
Go to full version