I have this example:

public function getCats():void
     {/*Loads the Catagories */
     trace("In GetCats");
         gateway=new NetConnection();
         var result:Responder = new Responder(gotCats,noCats);
         gateway.objectEncoding=flash.net.ObjectEncoding.AMF3;
         gateway.connect("url");
         gateway.call("ymtu.getCats", result);


         function gotCats(response:Object):void
         {trace(response + "got results");
             cats=new ArrayCollection( ArrayUtil.toArray(response));
         }

         function noCats(response:Object):void
         {   trace(response + "got NO results");
             cats=null;
         }
     }/*end getcats*/

I set the ArrayCollection and have a datagrid dataprovider bound to the
variable.

This works for me.


--- In [email protected], "oneproofdk" <[EMAIL PROTECTED]> wrote:
>
> Hi Dave
>
> Hmm - now I trace [object Object] - seem slike the same. Here's what I
> did :
> public function initApplication():void
>   {
>    gateway = new RemotingConnection( gwurl );
>    gateway.call( "inventory.getInventoryGroups", new
> Responder(onResult, onFault));
>   }
>   public function onResult( result : Object ) : void
>   {
>    var dp:ArrayCollection = new ArrayCollection(
> ArrayUtil.toArray(result))
>    trace (dp);
>    selInventoryGroups.dataProvider = dp;
>    Alert.show(selInventoryGroups.dataProvider.length.toString());
>   }
>
> This is very strange - does anybody have this example working ? There
> gotta be something wrong in my setup ??
>
> Thanks for your time :-)
>
> Mark
>
> --- In [email protected], "Dave" dave@ wrote:
> >
> > 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" <mark@> wrote:
> > >
>

Reply via email to