incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Omar Gonzalez <>
Subject Re: minor Validator improvment
Date Thu, 29 Mar 2012 06:06:18 GMT
On Wed, Mar 28, 2012 at 2:39 PM, Justin Mclean <>wrote:

> Hi,
> > True enough, and if enough people feel strongly about this, we can just
> add
> > a new method instead of replacing the existing one (not sure what to
> call it
> > though).  Personally, when using the validateAll method, I usually check
> the
> > length of the return, but don't use many other Array properties or
> methods.
> That I'd guess would be the most common way of using it followed by a cast
> (which this change would avoid) if the length is greater than 1.
> I'm a bit on the fence with this change having a typed return is better
> but existing code would have to change.
> Perhaps it should be bundled up into with other validator changes to
> modernise the classes? But not sure exactly what off the top of my head.
> Thanks,
> Justin

This is a good example where method overloading would come in handy. But
since we don't have that what about just adding Validator.validateAll2();
which would return a Vector.<ValidationResultEvent>? I don't think we
should change the input from Array to Vector type though, unless there's a
way to declare a Vector in MXML. Declaring an Array in MXML and setting up
validators in MXML that use bindings is convenient and I would use that
with Validator.validateAll2(); in my form validations.


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message