Re: If your CFC takes a struct, can Flash provide one via remoting?
> On Tue, 28 Dec 2004 15:24:36 -0500, Jeff Small <[EMAIL PROTECTED]> wrote: >> If one of the things you're looking forward to doing is using some >> methods >> with Flash Remoting down the line, and you made an insert() method say, >> that >> was looking for a struct (insert(myStruct) for instance) can Flash >> provide >> the method with the appropriate structure that ColdFusion (the CFC) is >> expecting? > > Yes, but... Be aware of single argument methods: I seem to recall that > if Flash sees obj.method(singleArg) and singleArg is a struct, it > treats it much like CF's argumentCollection and passes the elements of > the struct as separate arguments I think. It's a special case with > single argument methods. Okay, then this leads me to my next question. Do I need to change my CFC if I know down the line I'd like to use it with Flash Remoting? Let's say I was in the beginning stages of writing the CFC, but before I began I wanted to make sure it was "remoting friendly"...is there something I need to do now? Create an optional second parameter that's just sort of useless? (like maybe just pass in a 1 if it's a remoting call or something?) Right now I'm just using a struct to pass into the CFC for an INSERT query...that's all this would be doing, taking a struct populated with form data and inserting it...any special tricks? Just asking because I'm at that early stage now, and anything I can do that will make the transition over to remoting more painless would certainly be appreciated... ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188922 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: If your CFC takes a struct, can Flash provide one via remoting?
On Tue, 28 Dec 2004 15:24:36 -0500, Jeff Small <[EMAIL PROTECTED]> wrote: > If one of the things you're looking forward to doing is using some methods > with Flash Remoting down the line, and you made an insert() method say, that > was looking for a struct (insert(myStruct) for instance) can Flash provide > the method with the appropriate structure that ColdFusion (the CFC) is > expecting? Yes, but... Be aware of single argument methods: I seem to recall that if Flash sees obj.method(singleArg) and singleArg is a struct, it treats it much like CF's argumentCollection and passes the elements of the struct as separate arguments I think. It's a special case with single argument methods. > So you can take advantage of your insert() later on with a nice > Flash form for instance, or something along those lines...without having to > change any of the underlying CFC code... Modulo the caveat above, yes. -- Sean A Corfield -- http://www.corfield.org/ Team Fusebox -- http://www.fusebox.org/ Breeze Me! -- http://www.corfield.org/breezeme Got Gmail? -- I have 6 invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188907 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
If your CFC takes a struct, can Flash provide one via remoting?
If one of the things you're looking forward to doing is using some methods with Flash Remoting down the line, and you made an insert() method say, that was looking for a struct (insert(myStruct) for instance) can Flash provide the method with the appropriate structure that ColdFusion (the CFC) is expecting? So you can take advantage of your insert() later on with a nice Flash form for instance, or something along those lines...without having to change any of the underlying CFC code... ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188897 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54