I agree, Ben. That's very frustrating. Also, the inability to call a
component's parent using super() or something like it is a tremendous
hit to anything like OO programming.

-----Original Message-----
From: Benjamin S. Rogers [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, July 17, 2002 5:59 PM
To: CF-Talk
Subject: RE: Using THIS scope in CFCs


> the only comment I have is that if you are using components to
> build object modeled applications, you shouldn't be including 
> files from cfcs.

I don't know what the original poster is using includes for, but I think
there are some really valid reasons to include files into a CFC.
Unfortunately, there are some really monumental problems with CFCs that
make including files problematic (i.e. the argument scope isn't
available or the fact that CFReturn is silently ignored in an included
file).

The reason I originally started experimenting with including files into
CFCs is that, if I included all of the actual logic of a function, it
kept both the CFC file and function files short and sweet. Additionally,
since ColdFusion supports dynamic includes, I reasoned that if I was
working on one function and had a syntax error in my code, it would not
cause other functions of the same CFC to throw an error.

Now, that said, I don't think CFIncludes are a great choice for code
reuse, at least not in an environment that supports custom tags,
CFModule calls, CFCs, etc. Nevertheless, I think there are several valid
reasons for using the CFInclude tag within CFCs. However, current CFC
bugs make it necessary to implement inelegant workarounds.

Benjamin S. Rogers
http://www.c4.net/
v.508.240.0051
f.508.240.0057


______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to