You could use this as well
Public function saveData( data:DataVO ):void
{
Var token:AsyncToken = service.saveData( data );
Token.data = data
{
And then in your command result function add the result.token to your
arraycollection so you don't need another round trip to the server to update
the arraycollection it will just add the data that you sent to the server to
the collection.
--- In [email protected], "Nayan" <[EMAIL PROTECTED]> wrote:
>
> import mx.rpc.AsyncToken;
> import mx.rpc.IResponder;
> import mx.rpc.remoting.Operation;
> import mx.rpc.remoting.RemoteObject;
>
> var service:RemoteObject =
> ServiceLocator.getInstance().getRemoteObject("getAllProducts");
>
> var operation:Operation = service.getOperation("get_information")
> as Operation;
>
> var token:AsyncToken = operation.send("0");
> token.addResponder(this);
>
> this works fine for me when i use cairngorm and amf-php for remoting.
>
> --
> Nayan Savla
> http://nayansavla.com/blog/
> Success Lies in Courage.
>
>
>
>
> --- In [email protected], "asaivanson" <asaivanson@> wrote:
> >
> > Does anyone have any idea why I'd be getting this error?
> >
> > Type Coercion failed: cannot convert
> > mx.rpc.remoting.mxml::[EMAIL PROTECTED] to mx.rpc.AsyncToken
> >
> > In Cairngorm I'm dispatching an event which fires on creationComplete.
> > The event triggers a RemoteObject, which throws this error from my
> > Delegate. I'm not sure what I'm missing here...
> >
>