I have a hunch the compiler hasn't linked in your AS classes, so when a VO is passed in with flash remoting the flash player doesn't have the as class files in memory so it can't convert the VO into the right classes.
 
In your creationComplete function try this:
 
{
    var foo1:user = new com.myco.project.user();
    var foo2:address  = new com.myco.project.adress();
    var foo3:car = com.myco.project.car();
}
 
These are throw away vars but they will get the classes linked into the players memory. There are better ways to do this, however this is a quick way to see if this is the problem.
 
If this isn't it. Double check the [RemoteClass(Alias="")) property and the alias="" attribute of your CFC, make sure they match "EXACTLY".
 
 
hth,
---nimer

 
----- Original Message ----
From: Douglas Knudsen <[EMAIL PROTECTED]>
To: flexcoders@yahoogroups.com
Sent: Thursday, July 27, 2006 10:12:18 AM
Subject: [flexcoders] remote object mapping frustration


Ok, I got this CFC modeling a composite object.  Lets say its com.myco.project. user.  user has three members:  userid a string, address a  com.myco.project. adress, and say cars a array of com.myco.project. car .  The CFCs work fine in that DAOs do their magik.  On the Flex side I have com.myco.project. vo.user, com.myco.project. vo.address, and com.myco.project. car all mapping to the above.  sounds good so far, eh?  Now, the Flex code kicks a event off that does the remoteobject connection to the CF server requesting a user object.  It gets built and according to the debug data I can see at the DOS prompt from CFServer, it is returned to Flex as the proper com.myco.project. car object containing the other objects properly.  BUT in the FlexBuilder debugger the returned object is listed as result = mx.utils.ObjectProx y (@5824481)   I've been bangin my head for hours on this.  I have many other setups like this working fine, suddenly this one doesn't.

My onresult() has a line like which throws a runtime error about type coercion
foo = event.result as user;

any thoughts?

--
Douglas Knudsen
http://www.cubiclem an.com
this is my signature, like it?


__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to