Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Flash Remoting / September 2005



Tip: Looking for answers? Try searching our database.

Am I missing something??

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Clacker - 26 Sep 2005 15:33 GMT
Hi, I've found that if I send an object to a CF component;

MyService.MyFunction( anObject );

And try to catch it with;

<cfargument name="theObject" type="struct" required="yes">

It throws back an error saying no argument was passed, and yet if I put a
random string before hand....

MyService.MyFunction(  "gibberish", anObject  );

and catch with;

<cfargument name="theString" type="string" required="yes">
<cfargument name="theObject" type="struct" required="yes">

It all works ok and I can access theObject fine....

Huh?? Am I missing something? Why wont it work if its only the object sent?
Surely the type translation is the same?
JadeBlue - 26 Sep 2005 19:31 GMT
Clacker,
When you send an object/struct as the only parameter, the gateway thinks you
are sending all parameters as an argument collection, trying to match the
object properties to each cfargument name. Because your object does not contain
a property called theObject, your function is not receiving any argument.
You can send your object inside another object:
MyService.MyFunction( {theObject: anObject } );
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.