You need the Object to be an array collection then you need to convert: yourVar=new ArrayCollection( ArrayUtil.toArray(response));/*response being your returned object*/
I hope that helps --- In [email protected], "oneproofdk" <[EMAIL PROTECTED]> wrote: > > I'm using AMFPHP 1.9B and have created a service called > "inventory.getInventoryGroups" - in the AMF service browser I see the > result just perfect. : > (mx.collections::ArrayCollection)#0 > filterFunction = (null) > length = 5 > list = (mx.collections::ArrayList)#1 > length = 5 > source = (Array)#2 > [0] (Object)#3 > data = 1 > label = "Moduler" > [1] (Object)#4 > data = 2 > label = "Hylder" > [2] (Object)#5 > data = 3 > label = "Skuffer" > [3] (Object)#6 > data = 4 > label = "Hvidlakerede bakker" > [4] (Object)#7 > data = 5 > label = "Andet" > uid = "42A87A93-37B2-1BCF-2D31-1E7CD7004C04" > sort = (null) > source = (Array)#2 > > But when I try to use the result in Flex (I've modified the examples > from Adobe > <http://www.adobe.com/devnet/flex/articles/flex2_amfphp.html>, using a > RemotingConnection copied from the Adobe example. > > The problem is, that I get an Object back from AMFPHP and I just cant > figure out how to use that ?? > > This is my AS snippet : > public var gateway : RemotingConnection; > public function initApplication():void > { > gateway = new RemotingConnection( gwurl ); > gateway.call( "inventory.getInventoryGroups", new > Responder(onResult, onFault)); > } > public function onResult( result : Object ) : void > { > trace( result ); > selInventoryGroups.dataProvider = result as ArrayCollection; > } > public function onFault( fault : String ) : void > { > trace( fault ); > } > > I'm trying to populate a simple ComboBox with the result ! What have I > done wrong [:-/] ? > > BTW If I select result : ArrayCollection it returns an error "Cant > convert Object to ArrayCollection" > > Thanks for your help, > Mark >

