Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Slightly OT - Question about global functions (eg. buildURL())
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Andrew  
View profile  
 More options May 7 2012, 10:03 pm
From: Andrew <am2...@gmail.com>
Date: Mon, 7 May 2012 19:03:48 -0700 (PDT)
Local: Mon, May 7 2012 10:03 pm
Subject: Slightly OT - Question about global functions (eg. buildURL())

Hi,

This is not a FW/1 question per say, but more a question about stuff that
FW/1 does that I'd like to be able to do in other projects. ;-)

One of the awesome things about FW/1 is how you can call functions like
buildURL() from anywhere in your app.

How's it work though?  I can't seem to replicate this behaviour.  For
example:

BaseThing.cfc
===========

<cfcomponent>

    <cfscript>
        function sayBoo() {
            return "Boo";
        }
    </cfscript>

</cfcomponent>

Application.cfc
===========

<cfcomponent extends="BaseThing">
    <cfscript>
        this.name =  hash( getCurrentTemplatePath() );
    </cfscript>
</cfcomponent>

index.cfm
=======

<cfoutput>I am going to say boo: #sayBoo()#</cfoutput>

Running index.cfm gives error: "Variable SAYBOO is undefined."

I've seen some suggestions on Ben Nadel's blog on how to achieve this
behaviour:
http://www.bennadel.com/blog/1776-Creating-Globally-Accessible-User-D...

But I can't see any of these approaches being used in
org.corfield.framework.cfc.  

I'm probably missing something that's staring me in the face though.  Care
to share your magic, Sean? ;-)

Andrew.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.