Reputation: 1
<s:ArrayCollection id="theCollection">
<namespace:Items name="name 1" count="5" />
<namespace:Items name="name 2" count="6" />
<namespace:Items name="name 3" count="7" />
<namespace:Items name="name 4" count="8" />
</s:ArrayCollection>
here,It's throwing an error unknown namespace can you please illustrate why it is giving error
Upvotes: 0
Views: 38
Reputation: 670
"namespace" should be your namespace and "Items" the type of object you are making. You can use it like this for example:
<s:ArrayCollection id="theCollection">
<fx:Object name="name 1" count="5" />
<fx:Object name="name 2" count="6" />
<fx:Object name="name 3" count="7" />
<fx:Object name="name 4" count="8" />
</s:ArrayCollection>
This is an arraycollection which contains objects.
Another example would be:
<s:ArrayCollection id="theCollection">
<vo:User name="name 1" count="5" />
<vo:User name="name 2" count="6" />
<vo:User name="name 3" count="7" />
<vo:User name="name 4" count="8" />
</s:ArrayCollection>
In this case, I am making an ArrayCollection containing Users. I use my custom class User which can be found in vo(valueobject package).
Upvotes: 1