because that is shorthand for a matched ending tag that can have text inside
it

<cfmodule template="foo.cfm" />

is the equivalent of
<cfmodule template="foo.cfm">
</cfmodule>

This is standard and common , esp for the XML and XHTML people out there.

That means that unless you've wrapped your custom tag's code with
logic to catch when the execution mode is "start" versus "end", then the
code
will get run twice : once when the beginning of the tag is encountered and
once when the ending of the tag is encountered

you likely want to use something like:

<cfif thisTag.ExecutionMode is 'start'>
...etc to restrict the execution to only occuring once


----- Original Message -----
From: "Taco Fleur" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, February 23, 2003 4:48 AM
Subject: Re: Routines cannot be declared more than once. UDF ???


> Any idea why it runs twice when you terminate it with a forward slash?
> So you can't make your ocde xml compliant in CF5?
>
>
>
> ----- Original Message -----
> From: "Matthew Walker" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Sunday, February 23, 2003 6:46 PM
> Subject: Re: Routines cannot be declared more than once. UDF ???
>
>
> > Aside from this UDF issue, it's worth noting that if you use a /> at the
> end
> > of your custom tag call, the code will run twice, which could be bad if
> > you're writing code that hanndles money, but is always going to make
your
> > code twice as slow whatever the circumstance.
> >
> > What you can do if you want is wrap this around the content of your
custom
> > tag: <cfif thistag.executionMode eq "start">...code goes here...</cfif>
> >
> > Matthew Walker
> > Electric Sheep Web
> > http://www.electricsheep.co.nz/
> >
> > ----- Original Message -----
> > From: "Taco Fleur" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Sunday, February 23, 2003 5:44 PM
> > Subject: Re: Routines cannot be declared more than once. UDF ???
> >
> >
> > > V5
> > >
> > > Thanks Isaac, this was indeed the problem, I called the custom tag
like
> > <tag
> > > /> trying to confirm with valid xml...
> > >
> > > Thanks again..
> > > ----- Original Message -----
> > > From: "S. Isaac Dealey" <[EMAIL PROTECTED]>
> > > To: "CF-Talk" <[EMAIL PROTECTED]>
> > > Sent: Sunday, February 23, 2003 2:39 PM
> > > Subject: Re: Routines cannot be declared more than once. UDF ???
> > >
> > >
> > > > What version of CF Server?
> > > >
> > > > I know at least one way this can happen using CF 5.
> > > >
> > > > <cfinclude template="myudftemplate.cfm" />
> > > >
> > > > The trailing slash at the end of the tag (recommended on CF MX as
> valid
> > > xml
> > > > syntax) causes the file to be included twice (or such was my
> > experience).
> > > >
> > > > Otherwise, do a multifile search through the application directory
and
> > all
> > > > subdirectories for the name of the function and if that turns up
> > nothing,
> > > > then do the same search for the name of the file containing its
> > > definition.
> > > >
> > > > s. isaac dealey                954-776-0046
> > > >
> > > > new epoch                      http://www.turnkey.to
> > > >
> > > > lead architect, tapestry cms   http://products.turnkey.to
> > > >
> > > > tapestry api is opensource     http://www.turnkey.to/tapi
> > > >
> > > > certified advanced coldfusion 5 developer
> > > > http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
> > > >
> > > >
> > > > > I get the following error, I tried everything, even
> > > > > putting the function in a seperate file. And the function
> > > > > is not declared twice for sure. anyone?
> > > > > Error Diagnostic Information
> > > >
> > > > > Routines cannot be declared more than once.
> > > >
> > > >
> > > > > The routine rfc has been declared twice in different
> > > > > templates.
> > > >
> > > >
> > >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to