If you read my post from last night (How does Flex 2.0 handle ColdFusion Query results), I was asking precisely the same question.
I am waiting to hear back from Dave regarding this, and see if my theory is correct. If I understand what Dave was trying to say, the Event Object in Flex 2.0 is much more advanced than previous versions, and it has the intelligence to figure out what type of data it's holding. The only way it works properly however, is if you directly assign it to a Variable. For some reason, doing it this way triggers the conversion process, ensuring that the data gets properly formatted and assigned to the Variable. >From what I can tell, you can Cast the "event.result" data brought back using the "As" command without causing it to break, but if you stick it inside of a constructor (for example, ArrayCollection(event.result)), it seems to hose everything up. These are just my observations for the moment, but it's amazing how radical of a difference it makes, doing things in a slightly different way - even know it shouldn't make any difference. It is however, the difference between something working, and NOT working... Mike -----Original Message----- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of polestar11 Sent: Friday, July 28, 2006 5:48 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ArrayCollections Hi Jeremy I have also had the problem in the past of the 'as X' expression returning null. To solve it you dont have to create a new ArrayCollection object, but only cast it as one: > countries = ArrayCollection(event.result.countries) I dont know what the difference is between each: myData as ArrayCollection vs. ArrayCollection(myData) Does anyone out there know the difference? Regards Tracy -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/