>countries = new ArrayCollection(event.result.countries as Array);
From: jtooley_1999 <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Friday, July 28, 2006 2:03:28 AM
Subject: [flexcoders] ArrayCollection
Hi all,
I am banging my head against the wall on this one.
We have an app that runs on two different servers.
One calls a CFC and uses <mx:RemoteObject>
The other one calls a java servlet using <mx:HTTPService> but they both
retrieve the same data.
With the CFC we are using remoting and we can access the data by going
public function geoResultHandler( event:ResultEven t):void
{
countries = event.result. countries as ArrayCollection;
// difference
blah blah blah... more code
}
and to call it
<mx:ComboBox id="theCountry" x="10" y="58" prompt="Please Select A
Country" dataProvider= "{countries} " labelField=" country_long"
change="setProvince ()" width="90%">
This works great.....
But with <mx:HTTPService> .. using that way returns null.. so we have to
use the following
public function geoResultHandler( event:ResultEven t):void
{
countries = new
ArrayCollection( event.result. countries
as Array); // difference
blah blah blah... more code
}
<mx:ComboBox id="theCountry" x="10" y="58" prompt="Please Select A
Country" dataProvider= "{countries} " labelField=" country_long"
change="setProvince ()" width="90%">
Can anyone explain the difference of using a variable as an
ArrayCollection instead of declaring new ArrayCollection( )
Thanks
Jeremy Tooley
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___