inline vs cfinvoke...

2006-05-16 Thread Ryan Guill
Hey guys, Say I have the following method: cffunction name=foo access=public returntype=struct output=false cfargument name=arg1 type=string required=True / cfset var result= structNew() / cfset result.output = True / cfreturn result / /cffunction I can obviously do the

RE: inline vs cfinvoke...

2006-05-16 Thread Ian Skinner
in this case the methodRet will equal the structure result with output as a key. Is there a way in the cfinvoke syntax to specify that methodRet should equal result.output ? I do not think so, method chaining is one of the big reasons people like to use the createObject() function for

Re: inline vs cfinvoke...

2006-05-16 Thread Ryan Guill
Definately, and I agree, but there are times when I am passing several arguments to a method I prefer to use cfinvoke because it makes the code much easier to follow in case I or anyone else has to come back to it. And I have no problem with following the cfinvoke with a cfset afterwards to get

Re: inline vs cfinvoke...

2006-05-16 Thread Matt Williams
If readability for lots of arguments is your concern, what about creating a structure? cfset myArgs = StructNew() / cfset myArgs.foo = myVar1 / cfset myArgs.bar = myVar2 / cfset methodRet = component.foo(argumentCollection=myArgs).output /