Hi Piotr, sorry, I have this in my real project and forgot to transfer to Royale, will do now, so you can have it and check it you see there's something Greg or I forgot.
thanks El vie., 19 abr. 2019 a las 15:43, Piotr Zarzycki (< [email protected]>) escribió: > Hi Carlos, > > I'm looking into Validator, cause I have started using it more. I did port > EmailValidator from Flex to Jewel in my application but I'm not sure > whether it is actually require here - If yes I can commit it. > > However I would like to ask why actually inside validator class when you > setup such properties like trigger/triggerEvent you are using private > fields instead of a public one ? Here is the crucial example [1] > > Setting that to private field causes code duplication, cause in > StringValidation you are registering to the triggerEvent [2], which > actually would be done in trigger [3] property of Validator class. > > Is there any reason to do not user public properties by you ? I would love > to change that. > > [1] > > https://github.com/apache/royale-asjs/blob/8677a93c28ef5ff85123071b484429b8b17cd3ad/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as#L166 > [2] > > https://github.com/apache/royale-asjs/blob/8677a93c28ef5ff85123071b484429b8b17cd3ad/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/StringValidator.as#L72 > [3] > > https://github.com/apache/royale-asjs/blob/8677a93c28ef5ff85123071b484429b8b17cd3ad/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/validators/Validator.as#L116 > > Thanks, > -- > > Piotr Zarzycki > > Patreon: *https://www.patreon.com/piotrzarzycki > <https://www.patreon.com/piotrzarzycki>* > -- Carlos Rovira http://about.me/carlosrovira
