I removed all arguments in the constructor and it worked!

Thank you 'actionscript_czar'.  I appreciate your help and I hope 
others benefit from it.

Orville

> Can you either get rid of the arguments in the constructor or set 
> defaults ( probably to empty strings )?
> 
> --- In [email protected], "creativepragmatic" 
> <creativepragmatic@> wrote:
> >
> > It does.  Here is the class.
> > 
> >     [RemoteClass(alias="com.xtremesecurity.security.vo.UserVO")]
> >     [Bindable]
> >     public class UserVO implements ValueObject
> >     {
> >             public var id:int;
> >             public var email:String;
> >             public var username:String;
> >             public var lastIP:String;
> >             public var password:String;
> >             public var level:int;
> >             
> >             public function UserVO(email:String, password:String)
> >             {
> >                     this.email = email;
> >                     this.password = password;
> >             }
> >     }
> > 
> > 
> > 
> > 
> > --- In [email protected], "actionscript_czar" <daryl@> 
> > wrote:
> > >
> > > Does the UserVO constructor require arguments?  If it does can 
> you 
> > > set defaults?
> > > 
> > > --- In [email protected], "creativepragmatic" 
> > > <creativepragmatic@> wrote:
> > > >
> > > > Hello,
> > > > 
> > > > I am trying to convert an existing Flex/AMFPHP app to 
Cairngorm 
> > but 
> > > am 
> > > > having trouble returning value objects from PHP.
> > > > 
> > > >     public function login($userVO)
> > > >     {
> > > >         $user = new UserVO();
> > > > 
> > > >         // yada yada yada, user authenticated, logged and full 
> > > details 
> > > > received
> > > > 
> > > >          $user->id = pg_fetch_result($result, 0, "id");
> > > >          $user->email = pg_fetch_result($result, 0, "email");
> > > >          $user->username = pg_fetch_result($result, 0, 
"name");
> > > >          $user->lastIP = pg_fetch_result($result, 0, 
"last_ip");
> > > >          $user->password = pg_fetch_result($result, 0, 
> > "passhash");
> > > >          $user->level = pg_fetch_result($result, 0, "level");
> > > > 
> > > >          return $user;
> > > >     }
> > > > 
> > > > Here is the error I get from Flash Player: 
> > > > 
> > > >      ArgumentError: Error #1063: Argument count mismatch on 
... 
> > > > vo::UserVO(). Expected 2, got 0.
> > > > 
> > > > 
> > > > Here is what I get from the fault handler:
> > > > 
> > > >      Didn't receive an acknowledged message.
> > > > 
> > > >      Was expecting mx.messaging.messages.AcknowledgeMessage, 
> but 
> > > > received null.
> > > > 
> > > > 
> > > > Hopefully, what I am doing will be painfully obvious to 
> someone. 
> > > > 
> > > > Thank you in advance for any help,
> > > > 
> > > > Orville
> > > >
> > >
> >
>



Reply via email to