OK, thanks for clarifying. I've got some interesting observations.

First, I've just tried to confirm how the CFC explorer works with CFINCLUDEd
templates that declare new methods, and--without even bothering to test use
of application variables--I find that such methods don't show up in the CFC
explorer. Here's how I tested it:

** hello.cfc **
        <CFCOMPONENT>
                <cfinclude template="include-cfc-method.cfm">
        
                <CFFUNCTION NAME="GetHello" ACCESS="REMOTE"
RETURNTYPE="string">
                        <CFRETURN "Hello World">
                </CFFUNCTION>
        
        </CFCOMPONENT>

*** include-cfc-method.cfm ***

        <cffunction name="test">
                <cfreturn "hello">
        </cffunction>

*** test.cfm ***

        <cfinvoke component="hello" returnvariable="fromhello"
method="test">

        <cfoutput>#fromhello#</cfoutput>

The test.cfm does show that the test method is found, but exploring test.cfc
doesn't show test to be a method in the CFC. 

But then I figured I'd see if I could at least get the error you do, so I
created an application.cfm with the following:

        <cfapplication name="test">
        <cfset application.loc = ".\">

And then changed the hello.cfc include to be:

        <cfinclude template="#application.loc#include-cfc-method.cfm">

And tried the test.cfm to make sure I had no mistakes, and it worked. Then I
used the CFC explorer, and it worked just fine. It *still* didn't show the
included method, though.  The only way I could get the error you mention was
if the application variable name simply was wrong (loc2, for instance). Or
in your case, perhaps it's just not firing the application.cfm you'd expect
some other reason. But it ran this one, when it was in the same directory as
the CFC. Maybe you've got a still different setup?

/charlie
http://www.carehart.org/blog/

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Chris Velevitch
Sent: Monday, October 16, 2006 1:06 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: CFC Explorer and Application.cfm


On 10/16/06, Charlie Arehart <[EMAIL PROTECTED]> wrote:
> Fair enough. How about being more explicit regarding where you're 
> using the application variables, such that the CFC explorer fails? 
> It's beddy-bye time

I'm doing cfincludes and I'm using the application variables to define the
location of these templates. The cfincludes are used to added common
functions and constants.


Chris
--
Chris Velevitch
Manager - Sydney Flash Platform Developers Group
m: 0415 469 095
www.flashdev.org.au




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to