I think the problem is no class alias registered. The serialized java class instance just converted to object. You need
something like registerClassAlias("my.server.side.java.Users", Bean); or [RemoteClass(alias="my.server.side.java.Users")] in you Users actionscript class William Chan --- In flexcoders@yahoogroups.com, "Ralf Bokelberg" <[EMAIL PROTECTED]> wrote: > > This happens if the result is not an instance of Users. Dimitrios's > way will give you an exception instead. > > Cheers, > Ralf. > > On 10/16/06, Dimitrios Gianninas > <[EMAIL PROTECTED]> wrote: > > > > try: model.currentUser = Users(event.result); > > > > Dimitrios Gianninas > > Optimal Payments Inc. > > > > > > > > -----Original Message----- > > From: flexcoders@yahoogroups.com on behalf of boy_trike > > Sent: Sun 10/15/2006 10:43 PM > > To: flexcoders@yahoogroups.com > > Subject: [flexcoders] problems assigning an object to an object > > > > <code snippet Main Application> > > > > [Bindable] > > public var model:ModelLocator = ModelLocator.getInstance(); > > > > > > private function processLoginResults( event : ResultEvent) : void { > > > > // model.currentUser = event.result as Users; > > model.currentUser.firstName = event.result.firstName; > > model.currentUser.lastName = event.result.lastName; > > > > <modelLocator> > > package util{ > > > > import flash.events.EventDispatcher; > > import mx.collections.ArrayCollection; > > // IMPORT ALL USER VO'S BELOW > > import vo.Users; > > > > > > [Bindable] > > public class ModelLocator extends EventDispatcher{ > > > > > > public function ModelLocator(){ > > // > > } > > > > private static var _instance:ModelLocator > > > > public static function getInstance() :ModelLocator { > > if( !_instance ){ > > _instance = new ModelLocator(); > > } > > return _instance; > > } > > > > > > // > > public var currentUser : Users = new Users(); > > } > > } > > > > <Users.as> > > package vo > > { > > [Bindable] > > public class Users > > { > > public var userID : int; > > public var firstName : String; > > public var lastName : String; > > public var loggedIn : Boolean = false; > > > > > > public function Users() { > > } > > } > > } > > > > > > The commented line near the top does NOT work. (leaves a NULL value in > > model.currentUser). > > > > > > Thanks > > Bruce > > > > > > > > -- > > WARNING > > ------- > > This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e- mail in error, please notify the sender. > > > > AVIS IMPORTANT > > -------------- > > Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. > > > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > -- > Ralf Bokelberg <[EMAIL PROTECTED]> > Flex & Flash Consultant based in Cologne/Germany > -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/