Paul,
<cfscript>
application.FooCFC.fooFunction("Peter", "Pizza");
</cfscript>
<!--- In Foo CFC instantiated in an application scope var --->
<cffunction name="fooFunction" ... >
<cfargument name="First_Name" ... />
<cfargument name="Fav_Food" ... />
<!--- Do something else --->
<cfreturn something />
</cffunction>
I passed the arguments to the function by position. I don't have to state an explicit argument name - only the position.
If I did:
<cfscript>
application.FooCFC.fooFunction( "Pizza","Peter");
</cfscript>
My first name would be "Pizza" and my fav. food would be "Peter".
Does this make sense?
The reason why I only want to pass by position is that each method I could possibly be passing to has a different argument name for the argument in position one. I'd either have to change that all or pass my argument by position instead of:
<cfscript>
application.FooCFC.fooFunction(Fav_Food="Pizza",First_Name="Peter");
</cfscript>
I don't know if there is a way I could make the method I want a variable and still pass it by position. Otherwise I'll get out of cfscript and use cfinvoke and change all the first position argument to the same name.
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- calling CFC in with dynamic variable - what am I missing her... Peter Farrell
- Re: calling CFC in with dynamic variable - what am I mi... Paul Kenney
- Re: calling CFC in with dynamic variable - what am ... Peter Farrell
- Re: calling CFC in with dynamic variable - what... Paul Kenney
- Re: calling CFC in with dynamic variable - ... Peter Farrell
- Re: calling CFC in with dynamic variab... Paul Kenney
- Re: calling CFC in with dynamic va... Peter Farrell
- Re: calling CFC in with dynamic variable - what am I mi... Paul Kenney
- Re: calling CFC in with dynamic variable - what am ... Peter Farrell
- Re: calling CFC in with dynamic variable - what... Paul Kenney
- Re: calling CFC in with dynamic variable - ... Peter Farrell
- Re: calling CFC in with dynamic variab... Paul Kenney
- Re: calling CFC in with dynamic va... Peter Farrell
- Re: calling CFC in with dynami... Paul Kenney
- Re: calling CFC in with dynami... Paul Kenney
- Re: calling CFC in with dynamic va... Peter Farrell