I can't absolutely say whether CF looks or not because I don't know what the
underlying discovery mechanism is.
What I have tested is putting test.cfc in 3 folders:
The webroot
A folder that has a ColdFusion mapping called '/'
The same folder as the calling template.
Each component has the following code:
<cfcomponent>
<cfset this.filepath = getCurrentTemplatePath()>
</cfcomponent>
The calling template does this:
<cfset myObject = createObject('component','/test')>
<cfdump var="#myObject#">
<cfset myObject = createObject('component','test')>
<cfdump var="#myObject#">
I've tried this with and without the cfc in the webroot, and without the CF
mapping.
In each test, the second call always loads the component from the same
directory as the calling template.
I'm not sure what the problem would be with using CFCs from cfczone.org as I
haven't looked at any of them.
Can you explain a bit more?
Spike
--------------------------------------------
Stephen Milligan
Code poet for hire
http://www.spike.org.uk
Do you cfeclipse? http://cfeclipse.tigris.org
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Massimo, Tiziana e Federica
Sent: Friday, June 11, 2004 11:45 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] CFC File Organization
> >Remember that CF caches its references. So if you called just "bar"
> >then CF caches the location of that. If you try to call a different
> >"bar" then you'll get the first one, not the "closest" one.
>
> Only if there isn't a component called bar.cfc in the directory of the
> calling template. That's always the first place it looks.
>
Does CF looks there even if already "discovered" bar.cfc? Doesn't it cache
the reference to bar.cfc and keep reusing it?
I sincerely would love to get some feedback on this, thanks.
> I have used this approach pretty extensively on some projects and have
found
> very few limitations or problems.
I am playing more or less with the same idea, since it looks like the safer
option I have on a shared box.
I just can't figure out a decent solution for single CFCs, like the ones
available from cfczone.org...
Massimo
----------------------------------------------------------
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]