Hi Firdosh,

I think this will only throw an error when you build your array in mxml.
We also tried using this with actionscript only, but ended up writing a 
TypedCollection instead.

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

"If a user attempts to assign elements of a data type other than String 
to the Array in an MXML file, the compiler issues a syntax error"

Link to the TypedCollection class: 
http://prana.svn.sourceforge.net/viewvc/prana/trunk/main/src/org/pranaframework/collections/TypedCollection.as?revision=25&view=markup

regards,
Christophe

Firdosh Tangri wrote:
>
> package {
>     import flash.display.Sprite;
>
>     public class TestIteratorPattern extends Sprite
>     {
>         
>         [ArrayElementType("String")]
>         private var test:Array=[34,34];
>         
>         public function TestIteratorPattern()
>         {
>             //test = new Array(10);
>             test[3]=23.34;
>         }
>     }
> }
>
> shouldnt this throw an error ???
>
>
>  

Reply via email to