How about defining/checking for the function in a prefuse action?

On 31/10/06, Peter Boughton <[EMAIL PROTECTED]> wrote:
>
> That isn't my problem.
>
>
> Okay, I'll explain things using a simple example...
>
> Two custom tags, tagA and tagB.
> Either could be used first on different pages.
>
> Both tags use a function Func1.
>
> If I define Func1 in tagA, it doesn't exist when tagB is called first.
> If I define Func1 in tagB, it doesn't exist when tagA is called first.
> If I define Func1 in both tags, I've got multiple pieces of code to
> update.
>
> The solution is to create a Script1, which defines the function.
> However, I then have to execute Script1 somehow.
>
> Option 1 is to include Script1 in the tags, wrapped in If/IsDefined.
> I want to avoid having to do that for every control I create.
>
> Option 2 is to include Script1 immediately after cfimport.
> Better, but still an annoying requirement - having to put both on each
> page.
>
> What I'd like is a third option, that would (ideally), let me have a
> cfimport (or equivalent) in Application.cfc, and that would somehow
> trigger a script to include Script1, and removes any requirement for me to
> check for existance of Func1.
>
> But I don't know if that's feesible or how to figure out if it is or not.
>
>
>
>
> >How about just putting the fuinction call inside of a cfif block in
> >your main custom tag and check for the existence of the value in the
> >request scope?
> >
> >Pete
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258577
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to