And not to belabor the issue, but look at the image form the docs on that
same page (attached).  If that's no demonstrating just plain old include, I
don't know what does!


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Roland Collins
Sent: Friday, January 30, 2004 3:36 AM
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] More CFMX Excellence with Component Inheritance

Hmmm . . . This just makes the issue even more confusing then.  Most of the
time, cfinclude _does_ work exactly like cut and paste - at least to us end
users.  We don't know about all of the internal implementation details of
the tag, but intuitively, most of us would expect it to behave just like an
SSI.  *Especially* if we're to believe the MM documentation!!!!

http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p63.htm#wp110024
8

There's really not enough in that document to divine what's really going on!
There are no mentions of any of the strange CFC behavior! BUT if you want to
get really technical, try this one from the Developing CFMX Guide
(http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applic
ations_with_CFML/reuseIntro3.htm):

"The cfinclude tag adds the contents of a ColdFusion page to another
ColdFusion page, as if the code on the included page were part of the page
that uses the cfinclude tag. It lets you pursue a "write once use multiple
times" strategy for ColdFusion elements that you incorporate in multiple
pages. Instead of copying and maintaining the same code on multiple pages,
you can store the code in one page and then refer to it in many pages. For
example, the cfinclude tag is commonly used to put a header and footer on
multiple pages. This way, if you change the header or footer design, you
only change the contents of a single file. 

The model of an included page is that it is part of your page; it just
resides in a separate file. The cfinclude tag cannot pass parameters to the
included page, but the included page has access to all the variables on the
page that includes it. The following figure shows this model"

And let me call special attention to this line:

"The model of an included page is that it is part of your page; it just
resides in a separate file"

This is all over the documentation.  While I still think that the cfinclude
tag behaves counter intuitively, even if you say its behavior is correct,
NONE of the documentation supports that, so at the very least, the
documentation is in error.  But it goes further!  Take a look under the
"Building CFCs" doc
(http://livedocs.macromedia.com/coldfusion/6/Developing_ColdFusion_MX_Applic
ations_with_CFML/buildingComponents3.htm)

" Component method definitions exist between opening and closing cffunction
tags. To separate the component method code from the component file, use the
cfinclude tag to call the page that contains the component method code."

It even then goes on to give an example that shows cfinclude being used
EXACTLY like a plain old server side include:

<cfcomponent>
  <cffunction name="getLocalTime">
    <cfinclude template="getTime.cfm">
  </cffunction>
</cfcomponent>

It looks like someone got it wrong.  Who knows whether it was the doc guys,
the language guys, or the implementation guys, but it can be sure that they
weren't on the same page.  Whatever the case may be, us end-users have
almost no way of knowing what's really going on.

RC Collins


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Sean A Corfield
Sent: Friday, January 30, 2004 2:38 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] More CFMX Excellence with Component Inheritance

On Jan 29, 2004, at 10:55 PM, Matt Liotta wrote:
> BTW, in testing BD 6.1b2 it seems that using cfinclude in CFCs works 
> as expected and thus not compatible with CFMX. How's that for irony?

That depends on your definition of "as expected"... ;) I would *expect* 
cfinclude in CFCs to work the way it does in CFMX6.1 - a cfinclude'd 
file is a separately compiled entity so it clearly should not behave 
like cut'n'paste...

Regards,
Sean

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

<<attachment: reuseIntroa.gif>>

Reply via email to