Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread Leigh
I do not remember that being allowed in CF8. But you could assign the structure to a variable. Then use argumentCollection cfscript args = {name=mike, likes=beer,soccer,women}; myFunction( argumentCollection=args ); /cfscript

RE: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread Andy Matthews
Right. Not allowed in CF8, but it is allowed in CF9. andy -Original Message- From: Leigh [mailto:cfsearch...@yahoo.com] Sent: Tuesday, September 14, 2010 3:07 PM To: cf-talk Subject: Re: CF8+: Short Hand notation for calling a function within a component. I do not remember that

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread Tony Bentley
cfscript myFunction(mike, beer,soccer,women ); //either myFunction(name,likes){ //reference by arguments scope } /cfscript !--or -- cffunction name=myFunction cfargument name=name cfargument name=likes /cffunction ~| Order

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread Michael Grant
Yeah, that's not really applicable to what I was saying. On Tue, Sep 14, 2010 at 5:04 PM, Tony Bentley cascadefreehee...@gmail.comwrote: cfscript myFunction(mike, beer,soccer,women ); //either myFunction(name,likes){ //reference by arguments scope } /cfscript !--or -- cffunction

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread rex
why use a struct? what's wrong with myFunction(name=mike, likes=beer,soccer,women); if you want it shorter, then don't name the arguments, just do name and likes in order: myFunction(mike, beer,soccer,women); Michael Grant wrote: Calling a function from within the same

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread rex
Maybe I'm confused, sorry, but isn't this the same as myFunction(name=mike, likes=beer,soccer,women)? Leigh wrote: I do not remember that being allowed in CF8. But you could assign the structure to a variable. Then use argumentCollection cfscript args = {name=mike,

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread rex
oh, wow, I got confused there... This guy wasn't doing cffunction name=myFunction cfargument name=name type=string / cfargument name=likes type=string / !--- logic --- /cffunction So here, there's no need for argumentCollection, he can just do myFunction(mike,

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread Michael Grant
There's nothing wrong with it. However I wasn't asking how to write a function. My post was asking if I was wrong about passing in args as a short handed struct. And apparently I'm wrong with regards to cf9. On Tue, Sep 14, 2010 at 8:06 PM, rex li...@pgrworld.com wrote: why use a struct?

Re: CF8+: Short Hand notation for calling a function within a component.

2010-09-14 Thread rex
Yea, I dont know if you saw my other post. In your case, my answer is totally wrong. A lot of us thought that your function was expecting two arguments: name and likes, but it turns out you were taking in one argument of type struct. Before CF9, you can't call a function and pass an