Hi Rick. I'm not a Flash programmer, so I can't say for sure. But I 
think one reason is that in Flex, most of the packages and components 
are wrappers around the core objects.

I think the other difference is Flex 2 is based on ActionScript 3, and 
you're probably using Flash 8.5 which is based on Actionscript 2; which 
there is a major overhaul in the language.

I'm not sure how it is in Flash, but in Flex 2 lists are powered by the 
dataproviders (DP). Clear the DP, and you clear the list. In Flex 2 they 
moved away from dataproviders as arrays to collections. You can still 
use arrays to bind a list component to, but raw data types won't emit 
change events - so if you clear the array the list may not notice that 
change.

So if you use a collection class, you should get all the support you 
need to do that stuff. E.g the ArrayCollection supports getItemAt(), 
removeAll(), etc...

In the Flex 2 docs lookup the ListCollectionView, which all collection 
classes inherit from, and you'll see all the functions it provides.



Rick Root wrote:
> I'm confused.... surprise surprise.
>
> I've done a fair amount of flash RIA development using Flash 
> Professional.. and Flex actionscript documentation seems to have some 
> major differences.
>
> Like, the list component in Flash has a RemoveAll() method to allow me 
> to clear a list.  but I can't find anything like that for Flex.  The 
> Flex documentation for the list class doesn't mention things like 
> "removeAll()" or "getItemAt()"
>
> why the difference?  How do I remove all items from a list component in 
> Flex?
>
> (I'd post this to flexcoders but yahoo seems to not be accepting my 
> email.  I hate yahoo groups!)
>
> Rick
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:3039
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:37
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37

Reply via email to