kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #30598
Re: [PATCH] Add mils as user unit
Hi Wayne,
Wayne Stambaugh <stambaughw@xxxxxxxxx> writes:
> On 9/4/2017 4:14 PM, Mathias Grimmberger wrote:
[snip]
>> Input validation is implemented quite unevenly in any case, some inputs
>> do not even allow to input invalid characters (IMHO desirable), others
>> allow anything and complain later.
>>
>> Is there a plan how this should work, is WX_UNIT_BINDER the standard way
>> envisioned? Because in that case it needs some work.
>
> wxValidator is the standard way to customize control input and output.
> This is well documented in the wxWidgets documentation. Please do not
> create a custom design unless there is no way to do this as validator
> which I highly doubt. There are even source files for creating custom
> validators aptly named include/validators.h and common/validators.cpp.
I do not think about creating a custom validator design.
I'm thinking about whether bundling some of the validation setup and
handling into WX_UNIT_BINDER to be used for inputs of dimensions
(anything coming out in internal units) and general numbers (stuff like
percentages) might make things easier and more consistent.
But I have to think about it more. If I believe I have something I will
show it for discussion.
MGri
References