We have a bunch of calculated date variables which are needed at numerous
points in the application.  These variables are retrieved using a call to
Evaluate (in order to parse some fancy parameter strings for part of our
engine).  The variables occasionally need tweaking based on a particular
client.  Rather than have to customize our CFCs (and in numerous places no
less), we just include the variables in a separate file . . . or at least we
used to.  Now we're calling a function and returning a struct.  The old
method was much cleaner, but . . . oh well, we'll live.

More to the point, however - if the functionality is advertised, it should
work intuitively and consistently.  We worked around it because we noticed
it occurring during regression testing.  Not everyone will be so lucky.  I'm
more concerned about the average CF'er running into this, not the advanced
users.  Especially given that the CFC documentation actually uses CFINCLUDES
in the example code!!!!  

Roland

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Barney Boisvert
Sent: Friday, May 07, 2004 5:11 PM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] CFINCLUDE forces var scope into arguments?

The real question is why you'd ever use CFINCLUDE inside a CFC.  I've though
about going that route, but the only reason is to get around the
shortcomings of the tools available.  If you need to reuse a block of code
inside a CFC, use a function, don't use an include.  Problem solved.

Cheers,
barneyb

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Roland Collins
> Sent: Friday, May 07, 2004 2:05 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [CFCDev] CFINCLUDE forces var scope into arguments?
> 
> I agree that you need to do _something_ to make the variables 
> accessible, I
> just don't think copying them to the variables scope was the 
> right decision.
> It defeats the purpose of even bothering with "var" in a 
> function that uses
> an include, to say nothing of the havoc that threading can wreak on
> unsuspecting components using this methodology.
> 
> Roland

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