Is there a way to cast Client to a simple Object in order to use to in
the call to HTTPService.send()?
i tried the following:
service.send(this); which does not work
service.send(this as Object); which does not work

do I need to manually constuct the generic object?

package com.my.models
{
        [Bindable]
        public class Client
        {
                public var id:String;
                public var name:String;
                
                public function Client(){}
                
                public function save():void{
                        var service:HTTPService = new HTTPService();
                        service.url = "http://127.0.0.1:3000/flex/save_client";;
                        service.useProxy = false;
                        service.resultFormat = "text";
                        service.method = "POST";
                        service.addEventListener(ResultEvent.RESULT, 
onSaveResult); 
                        service.addEventListener(FaultEvent.FAULT, 
serviceFault);
                    service.send(this); // does not work
                    CursorManager.setBusyCursor(); 
                }
}

Reply via email to