RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-29 Thread Mehdi, Agha
You can also implement mapping like this = 1. AS VO -- Class TestVO { public var test1 : String; public var test2 : Array; function TestVO () { Object.registerClass ( testVO, TestVO );

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-29 Thread Mohanraj Jayaraman
I was about to post a question on 'Using Value Objects with CFC' and your example explains it all. Thanks again. Mohanraj --- Mehdi, Agha [EMAIL PROTECTED] wrote: You can also implement mapping like this = 1.AS VO -- Class TestVO

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-28 Thread Tom Link
I believe the solution Dirk provided solves this problem as well. That is, in addition to Mehdi's initial solution #2: remoteObject.cfFunction ( toPass, true ); You can use named argument syntax: remoteObject.cfFunction({arg1:toPass}); Where arg1 is also the name of the argument in the CFC

Re: [flexcoders] How to pass AS Objects to a CFC

2005-03-25 Thread Mohanraj Jayaraman
Thanks Paul. This seems to be a complex project and I am having a hard time following it. I wish they had a simple example. But I am still experimenting with ValueObject.cfc and hope I can get this done pretty soon. --- Paul Kenney [EMAIL PROTECTED] wrote: At work we figured out how to do

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-25 Thread Peter Farland
The history of this problem stems way back from Flash Remoting in ColdFusion 6.0. ActionScript 1.0 APIs for Flash Remoting introduced named arguments for CF-based invocation. The syntax for passing named arguments was usually listed like this in documentation:

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-25 Thread Mehdi, Agha
Thanks Peter for the explanation. That explains it. I am glad it worked Mohanraj. There's one more way of doing it without having to specify the other argument. var testObject = new Array(); // it has to be an array. It won't work if you did new Object() testObject[var1] = var1;

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-25 Thread Mohanraj Jayaraman
Thanks for the explantion Peter. That really helps. Mehdi thanks for yet another Tip. It works in FLEX. Mohanraj --- Mehdi, Agha [EMAIL PROTECTED] wrote: Thanks Peter for the explanation. That explains it. I am glad it worked Mohanraj. There's one more way of doing it without having to

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-24 Thread Dirk Eismann
Hi Mohanraj, CF needs named parameters when dealing with complex types passed as CFC arguments. You have to wrap the object you want to send to the CFC into another wrapper object. Inside the wrapper you define properties for every named argument. This should work: // AS snippet //

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-24 Thread Mohanraj Jayaraman
Hi Dirk, Thanks for your suggestion. But my condition differs from your example. Lets assume I had an AS Class 'MyClass.as' I am trying to do something like this in my MXML var o:Object = new MyClass(); I build an 'array of structures' in MyClass Object and I do pass the complex Object as

Re: [flexcoders] How to pass AS Objects to a CFC

2005-03-24 Thread Paul Kenney
At work we figured out how to do this a little while back for the Tartan Framework (http://www.tartanframework.org). If you download the code, take a look at the file /tartan/vo/ValueObject.cfc, and in particular the getFlashRemotingData() and setFlashRemotingData() methods. On Thu, 24 Mar

RE: [flexcoders] How to pass AS Objects to a CFC

2005-03-24 Thread Mehdi, Agha
Mohanraj, I learned it the hard way. There are two ways to do it. 1. Flex side: var toPass = new MyClass(); toPass.var1 = value; toPass.var2 = value; remoteObject.cfFunction ( toPass ); CF Side: cffunction name=cfFunction access=remote cfargument name=var1 cfargument

[flexcoders] How to pass AS Objects to a CFC

2005-03-23 Thread Mohanraj Jayaraman
Hi All, I've been trying to pass an AS Object to a Coldfusion CFC thorough FLEX RemoteObject calls. But I havent found any success so far. I knew there are examples provided my Macromedia for exchanging complex objects (http://www.macromedia.com/devnet/flex/articles/complex_data_03.html) , but

Re: [flexcoders] How to pass AS Objects to a CFC

2005-03-23 Thread Mohanraj Jayaraman
Hi Clint, Thanks for your reply. I think i was not clear ealrier on my problem. Here's a sample code I am dealing with. Please note the property 'modarray' of the 'pData' object. 'modarray' is populated with SelTP object _s whcih is an Array of Structures. Here I polupate the _s with