That was how it was originally (same error). Thought I might be having a type
issue so
added the Date.parse(). You can actually do it if it's specified in the braces
({}). From http://www.adobe.com/devnet/flex/quickstart/using_data_binding/ :
Note: The source property of an <mx:Binding> tag can contain curly braces. When
there
are no curly braces in the source property, the value is treated as a single
ActionScript
expression. When there are curly braces in the source property, the value is
treated as a
concatenated ActionScript expression.
Any other ideas?
G
--- In [email protected], "valdhor" <[EMAIL PROTECTED]> wrote:
>
> I may be wrong but I didn't think you could use a binding with a
> function. Try removing the Date.parse function from your binding tag...
>
> <mx:Binding source="{birthdayTI.text}"
> destination="tideContext.user.birthday"/>
>
>
> --- In [email protected], "hardaur55" <gander@> wrote:
> >
> > Hello all!
> >
> > I have a TextInput field that is to accept a date. There is a
> date validator attached to the
> > field and the text property of the date field is bound to a property
> in another field. Here's
> > the code:
> >
> > mxml:
> >
> > <mx:DateValidator id="validateBirthdayTI"
> > source="{birthdayTI}"
> > property="text"
> > required="true"/>
> >
> >
> > <mx:Binding source="{Date.parse(birthdayTI.text)}"
> > destination="tideContext.user.birthday"/>
> >
> > Actionscript:
> >
> > formIsValid = formIsValid && validate(validateBirthdayTI);
> >
> >
> > When the validator runs, I get the following error when doing a
> try/catch, otherwise it fails
> > silently.
> >
> > "The source attribute must be specified when the property attribute
> is specified."
> >
> > This seems to say that the source attribute for the validator isn't
> correct, but I don't see
> > anything wrong with it (and other fields/properties are fine). It
> also seems to somehow be
> > tied in to the binding as if I comment out the binding it works (and
> validates) just fine. I
> > have a feeling I'm running up against one of those very strange Flex
> errors that don't mean
> > what they say exactly ; )
> >
> > Any help is very much appreciated, I've been beating on this thing
> off and on for a week
> > and am getting pretty frustrated.
> >
> > Thanks!
> >
> > G
> >
>