Hello
I have an object on the server : "Adluser". This object is sent to the client as a return value of getUser() function.

I have an object on the flex side : "Adluser" with the same properties, and eventually some methods

Is it possible to receive directly a flex user ? For the moment, the object received is of class Object. I cannot "cast" it into my class :

for each (obj in event.result)
{
  output.text+=obj.name; // this works but my object is of class Object
  var user:Adluser=Adluser(obj); // this compiles but does not work
  output.text+=user.getFullName();
}

the output of user.getFullName() does not display anything...(the program seems to stop there)

Of course I can simply use the received object, but then I have to write a class with static methods to work on this object instead of calling methods of the object itself.

In the sample provided with flex hessian client, the "Words" are not directly used, all fields are copied from the received object.
Thanks for any info. (enclosed the Adluser flex class)

--
Très cordialement,

Riccardo Cohen
-------------------------------------------
Articque
http://www.articque.com
149 av Général de Gaulle
37230 Fondettes - France
tel : 02-47-49-90-49
fax : 02-47-49-91-49
package 
{
  //[RemoteClass(alias="adljavaflex.Adluser")]
  [Bindable]
  public class Adluser 
  {
    public var id:int;
    public var firstname:String;
    public var name:String;
    //public var hessianTypeName:String = "adljavaflex.Adluser";
    public function Adluser()
    {
      id=0;
      firstname="";
      name="";
      super();
    }
    //ADL
    public function getFullName():String
    {
      return(firstname+" "+name);
    }
  }
}
_______________________________________________
hessian-interest mailing list
[email protected]
http://maillist.caucho.com/mailman/listinfo/hessian-interest

Reply via email to