A hyphen is not a valid character in a variable name. From
http://www.senocular.com/flash/tutorials/as3withflashcs3/ -

When defining a variable you must only use numbers, letters, dollar signs ($)
and underscores (_) and a variable cannot start with a number.  Whereas
bits32, _bits32, and $bits32 are valid, 32bits is not valid for a variable
name since it starts with a number.

If you need to refer to properties with a hyphen in their name, use the
box-bracket method (obj["first-name"]).

.p

On Tue, Jun 22, 2010 at 10:19 AM, nd <[email protected]> wrote:

> Hi All,
>
> I am getting a ArrayCollection Object from some Webservice. It has
> objects with field names as "first-name", "last-name".
>
> Now if i am trying to put a trace on them then I get error.
>
> trace("name= "+ first-name);
>
> Flex is treating it as "first minus name" instead of first-name.
>
> Is there a workaround for this. How to get the values of these
> objects.
>
> Thanks,
> ND
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to