Great! Thanks Piotr! On Mon, 21 Jun 2021 at 13:59, Piotr Zarzycki <[email protected]> wrote:
> I've made one change for you. You can override handler for > cleanValidationErrors event -> > https://github.com/apache/royale-asjs/commit/93570392b1cd9442d632b1a956998a4b4a487669 > > > I kicked of build with my changes [1]. If you are using IDE distribution > wait for nightlies [2] 0.9.8-SNAPSHOT. > > [1] https://ci-builds.apache.org/job/Royale/job/Royale-asjs/1313/ > [2] https://nightlies.apache.org/Royale/Royale-asjs/ > > Thanks, > Piotr > > pon., 21 cze 2021 o 13:52 Piotr Zarzycki <[email protected]> > napisał(a): > >> Well in my opinion you should override only validate function where you >> registering on events etc, creating your own handlers and do what you want >> to do. The question is what do you need from inside that function? If you >> need to just call it in some specific moment dispatch an event from your >> validator like that: >> >> var host:IPopUpHost = UIUtils.findPopUpHost(hostComponent); >> (host as IUIBase).dispatchEvent(new Event("cleanValidationErrors")); >> >> >> >> >> >> pon., 21 cze 2021 o 13:37 David Slotemaker de Bruine < >> [email protected]> napisał(a): >> >>> Hi Piotr, >>> >>> I wanted to roll my own version of the FormValidator Class for a >>> component of mine that has children. So I copied the code and renamed the >>> class. But when the my validator validates its children and returns that >>> there are no errors and therefore the topTips should be destroyed, >>> validator.destroyErrorTip() fails as it is private. >>> >>> I am currently running custom validate functions and 2 seperate >>> FormValidators to solve the problem, but is less than optimal. >>> >>> David >>> >>> On Mon, 21 Jun 2021 at 13:30, Piotr Zarzycki <[email protected]> >>> wrote: >>> >>>> Hi David, >>>> >>>> It's been a while. I'm sorry for such a long delay. I looked into your >>>> case and having an destroyErrorTip protected and I came to the conclusion >>>> that I don't want to change anything. This method is marked as internal >>>> intentionaly - it is being called by validator instance in classes which >>>> extending Validator base class - it means if I make it protected it will >>>> fail with error: >>>> >>>> FormValidator.as(127): col: 39 Error: Attempted access of inaccessible >>>> method destroyErrorTip through a reference with static type Validator >>>> >>>> What is the problem with extending exactly ? Why do you actually need >>>> ? Do you want to force tooltip to be removed ? >>>> >>>> Thanks, >>>> Piotr >>>> >>>> śr., 26 maj 2021 o 18:56 David Slotemaker de Bruine < >>>> [email protected]> napisał(a): >>>> >>>>> Great! Cheers. >>>>> >>>>> On Wed, 26 May 2021 at 18:55, Piotr Zarzycki < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi David, >>>>>> >>>>>> Sure I can do that for you - I will check code if it's reasonable and >>>>>> possible. It just been crazy lately with several things here ;) >>>>>> >>>>>> śr., 26 maj 2021 o 18:27 David Slotemaker de Bruine < >>>>>> [email protected]> napisał(a): >>>>>> >>>>>>> Bumping this again as I realize I do need to create custom >>>>>>> Validators, as it is, I don't think it can be done because the >>>>>>> "destroyErrorTip()" function is internal. Would it be possible to make >>>>>>> it >>>>>>> protected? >>>>>>> >>>>>>> >>>>>>> >>>>>>> On 2021/05/21 14:11:31, David Slotemaker de Bruine < >>>>>>> [email protected]> wrote: >>>>>>> > I ended up using a form per Card and then just calling .validate >>>>>>> on the FormValidator when submitting the Forms. If all FormValidators >>>>>>> returned true the Forms are valid. >>>>>>> > >>>>>>> > >>>>>>> > On 2021/05/21 11:06:42, David Slotemaker de Bruine < >>>>>>> [email protected]> wrote: >>>>>>> > > Hi all, >>>>>>> > > >>>>>>> > > I have some Form Items in different Cards within a Grid >>>>>>> Component. I would like to validate them before submitting the data. >>>>>>> > > >>>>>>> > > If I create a Form tag in each Card and a Form Validator for >>>>>>> each card I can manually execute the validators and continue the >>>>>>> process, >>>>>>> but this is cumbersome. >>>>>>> > > >>>>>>> > > If you add the Form within the Grid Component, the Grid will not >>>>>>> render correctly. >>>>>>> > > >>>>>>> > > So I decided to "roll my own", I have copied the ForValidator >>>>>>> and renamed it GridValidator, but I cannot compile it as the compiler >>>>>>> can't >>>>>>> find the file method " validator.destroyErrorTip();" >>>>>>> > > >>>>>>> > > The Class extenders >>>>>>> org.apache.royale.jewel.beads.validators.Validator; as the >>>>>>> FormValidator >>>>>>> does, but the source code I have doesn't have that method either. >>>>>>> > > >>>>>>> > > Any clues on how I should do this better, or how to solve the >>>>>>> compiler error? >>>>>>> > > >>>>>>> > > Cheers, >>>>>>> > > >>>>>>> > > David >>>>>>> > > >>>>>>> > >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Piotr Zarzycki >>>>>> >>>>> >>>>> >>>>> -- >>>>> >>>>> *David Slotemaker de Bruïne* >>>>> *Head of Educational Robotics* >>>>> >>>>> >>>>> >>>>> Av. Sarriá, 130 - 08017 Barcelona >>>>> <https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g> >>>>> >>>>> >>>>> T. +34 932 523 729 ext. 135 >>>>> >>>>> [email protected] >>>>> >>>> >>>> >>>> -- >>>> >>>> Piotr Zarzycki >>>> >>> >>> >>> -- >>> >>> *David Slotemaker de Bruïne* >>> *Head of Educational Robotics* >>> >>> >>> >>> Av. Sarriá, 130 - 08017 Barcelona >>> <https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g> >>> >>> >>> T. +34 932 523 729 ext. 135 >>> >>> [email protected] >>> >> >> >> -- >> >> Piotr Zarzycki >> > > > -- > > Piotr Zarzycki > -- *David Slotemaker de Bruïne* *Head of Educational Robotics* Av. Sarriá, 130 - 08017 Barcelona <https://maps.google.com/?q=Av.+Sarri%C3%A1,+130+-+08017+Barcelona&entry=gmail&source=g> T. +34 932 523 729 ext. 135 [email protected]
