I have a class (DataType) that I've written that is intended to be
used in an ArrayCollection of these objects (DataTypes).  I would like
to guarantee that this ArrayCollection can only be populated with
objects of the DataType class.

My initial thought was to extended the ArrayCollection class in the
DataTypes class, then override the addItem() method and change the
item:Object argument to item:CustomObject (which extends Object). 
Evidently this isn't permissible in Flex (we're still using Flex 2 here).

Are there any best practices surrounding this task?  Can anyone offer
some advice on how I should go about ensuring that the objects added
to this ArrayCollection are objects of my custom class?

Thanks in advance.

Reply via email to