Array elements are untyped, but Vector supports strongly-typed elements.

var v:Vector.<String> = new Vector.<String>();
v[0] = "Hello";
v[1] = "World";

Note that there is no literal syntax for Vector similar to [ "foo", "bar" ] for 
Array. However, you can convert an Array to a Vector:

var v:Vector.<String> = Vector.<String>(["Hello", "World"]);

Gordon Smith
Adobe Flex SDK Team

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf 
Of Paul Andrews
Sent: Friday, March 13, 2009 2:03 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Array of objects


LOL, I should be doing the tutorials!

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Book_Parts&file=metadata_141_05.html

Paul

----- Original Message -----
From: "Paul Andrews" <p...@ipauland.com<mailto:paul%40ipauland.com>>
To: <flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>>
Sent: Friday, March 13, 2009 8:59 AM
Subject: Re: [flexcoders] Array of objects

>
> ----- Original Message -----
> From: "christophe_jacquelin" 
> <christophe_jacque...@yahoo.fr<mailto:christophe_jacquelin%40yahoo.fr>>
> To: <flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>>
> Sent: Friday, March 13, 2009 8:46 AM
> Subject: [flexcoders] Array of objects
>
>
>> Hello,
>>
>> How to declare an array of n Objects of the class myClass ? How did we
>> indicates the type of the object to the array ?
>
> private var myArray:Array = []; // You cannot give the array a dimension,
> nor can you type the obects it holds
> private var anArray:Array = new Array(); // alternative. Naturally it
> doesn't have to be private..
>
> Please do some tutorials Christophe.
>
> Paul
>
>>
>> Thank you,
>> Christophe,
>>
>>
>>
>> ------------------------------------
>>
>> --
>> Flexcoders Mailing List
>> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
>> Alternative FAQ location:
>> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
>> Search Archives:
>> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
>> Links
>>
>>
>>
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>

Reply via email to