Josh, that doesn't make much sense (not what or how you described it, but rather the workaround behaving any differently)... so can you send me a simple reproducible case offline (remember to rename .zip extensions so that they get are allowed through our email filter) and I can take a close look.
 
Pete


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Joshua Garnett
Sent: Wednesday, June 14, 2006 12:24 PM
To: [email protected]
Subject: [flexcoders] Flex 1.5 AMF Issue

I'm having a problem passing objects that contain objects through the AMF gateway.  I've found a way to work around it, but I'm not really keen on the solution.  What I'm trying to do is pass an object to a java function.  This object contains a reference to another object within it.  When trying to access methods on the object that is referenced I get a java exception.

Here is some example flex code that doesn't work:

var myObject:MyObject = new MyObject();
var subObject:SubObject = new SubObject();
myObject.sub = subObject;
service.myFunction(myObject);

Here is my workaround:

var myObject:MyObject = new MyObject();
var subObject:SubObject = new SubObject();
myObject.sub = new SubObject();
myObject.sub.vara = subObject.vara;
myObject.sub.varb = subObject.varb;
...
service.myFunction (myObject);


I'd rather not have to manually create an object on the object and then manually copy over each of the variables.  Is there a better way around this?  Perhaps a setting on the RemoteObject?


--Josh

__._,_.___

--
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