Thanks Nathan.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Nathan Dintenfass
Sent: Monday, June 21, 2004 4:02 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] anyone able to explain why I'm getting this
CFC-related error message?

This is the same error you get when trying to use named arguments with SUPER
methods (a known, and annoying, bug) -- seems you can't use named methods
with "caller" CFCs (which is very much like "super", I suppose).

That said, Stephen's advice of passing the component as an argument is still
good advice.





> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of David McCutcheon
> Sent: Monday, June 21, 2004 3:33 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] anyone able to explain why I'm getting this
> CFC-related error message?
>
>
>
> 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.F
> oo.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]
>

----------------------------------------------------------
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]

----------------------------------------------------------
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