This works:

test.cfc
---------------------------
<cfcomponent>
        <cfscript>
                function getCGI() {
                        return cgi;
                }
        </cfscript>
</cfcomponent>

temp.cfm
----------------------------------------------
<cfdump var="#createObject('component','test').getCGI()#" />


So, while it had never dawned on me to try it, that's kinda cool...

It never occurred to me that you could write functions inside a CFC
using cfscript function declarations. The things you learn from this
internet thingie...

Anyway, that much works... don't know how your CFC is laid out, so I
can't speak to your specific issue.

Laterz,
J

On Wed, 2 Mar 2005 14:56:18 -0700, Paul <[EMAIL PROTECTED]> wrote:
> This must be easier than I'm making it this afternoon.
> 
> All the UDFs from cflib.org are written in cfscript.  Is there a way to
> store them in a CFC, say Util.cfc, and then call them from another CFC?
> When I attempt to do so CF can't find the function.  I experimented and
> wrapped the cfscript inside a cffunction definition and now CF apparently
> can't see the arguments I'm passing in.
> 
> So, how does one call cfscript-based functions from within a CFC?
> 
> -paul

> Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
> 


-- 
Continuum Media Group LLC
Burnsville, MN 55337
http://www.web-relevant.com
http://cfobjective.neo.servequake.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:197223
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to