Hi.

Pardon me in advance if I'm just being a moron and missing something simple,
but here's what I'm running into:

I have a method call inside of a custom tag that refers to a previously
instantiated component (Variables.Blah) and related arguments
(Variables.Blah.args) on the calling page (see below):

Caller.Variables.Blah.args = structNew();
if ( Attributes.SomeID IS NOT "" ) { 
        Caller.Variables.Blah.args.Mode = "ThisID"; 
        Caller.variables.Blah.args.theID = Attributes.SomeID; 
        }  
else { 
        Caller.variables.Blah.args.Mode = "ThatID";
Caller.variables.Blah.args.theID = Attributes.SomeOtherID; 
        } 
Variables.Foo =
Caller.Variables.Blah.getFoo(argumentCollection=Caller.Variables.Foo.args);

But, when this code executes I get the following CF error:

** Cannot invoke method getFoo on an object of type
coldfusion.runtime.Struct with named arguments.  

** Use ordered arguments instead. 

For reference purposes, here's the method itself:

<cffunction name="getFoo"...>
                
        <cfargument name="Mode" type="string" required="true">
        <cfargument name="theID" type="string" required="true">
                
        <cfquery name="instance.qGetFoo"...>                    
        SELECT  
        <cfif arguments.Mode IS "ThisID">
        ThisStuff
        <cfelseif arguments.Mode IS "ThatID">
        ThatStuff
        </cfif>
        FROM    Foo
        WHERE FooID = '#arguments.theID#'
        </cfquery>
                
        <cfreturn instance.qGetFoo>
</cffunction> 

So, anyone have an idea as to what's causing the error?

Thanks for your time.

- DM

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' 
in the message of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to