Shouldn't you be doing this?

<cfif NOT isFunction("doTocOption")>
<cfscript>
  function doTocOption(myQuery, contextFilePrefix) {
    ...
  }
</cfscript>
</cfif>

or

<cfif NOT isCustomFunction("doTocOption")>
<cfscript>
  function doTocOption(myQuery, contextFilePrefix) {
    ...
  }
</cfscript>
</cfif>

Qasim

----- Original Message -----
From: Jamie Jackson <[EMAIL PROTECTED]>
Date: Wed, 21 Jul 2004 14:12:24 -0400
Subject: Re: UDF within a Custom Tag
To: CF-Talk <[EMAIL PROTECTED]>

On Wed, 21 Jul 2004 13:29:40 -0400, in cf-talk you wrote:

>What about using isCustomFunction() or isFunction from
>http://cflib.org/udf.cfm?ID=286
>
>Qasim

I just tried your suggestion, and it behaved the same as if I didn't
have the conditional in there at all:

<cfif NOT isFunction("doTocOptionIsDeclared")>
<cfscript>
  function doTocOption(myQuery, contextFilePrefix) {
    ...
  }
</cfscript>
</cfif>

The error associated with the above is:
"Routines cannot be declared more than once.

The routine doTocOption has been declared twice in different
templates."

Thanks for the reply,

Jamie________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to