One thing I do for those special functions that aren't in cfscript, I have a cfscript tag library file. It basically has the simple method names for the tag based features I want to take advantage of..
 
I include the library in my application, and can call these functions from cfscript like so: dump(myVar); abort(); etc.....
 
example of cfscript method function library:
<cffunction name="dump">
    <cfdump var="#Arguments[1]#">
    <cfif Arguments[2]>
        <cfabort>
    </cfif>
</cffunction>
 
<cffunction name="abort>
    <cfabort>
</cffunction>
 
<cffunction name="location">
    <cfargument name="url" type="string" required="true">
    <cfargument name="addtoken" type="boolean" required="false" default="false">
    <cflocation url="" addtoken="#Arguments[2]#">
</cffunction>
 
<cffunction name="include">
    <cfinclude template="#Arguments[1]#">
</cffunction>
 

 
On 10/26/05, Mark Mandel <[EMAIL PROTECTED]> wrote:
Yeh G-ds...

Every method would then be public, and no arguments are typed..

Whee... fun!

I must admit that most of my functions look similar to:

<cffunction ...>
  <cfargument ....>
<cfscript>
    //do stuff
</cfscript>
</cffunction>

The only time I tend to escape cfscript inside is when I have to do
something like lock a block of code.

Mark

On 27/10/05, Eric Knipp <[EMAIL PROTECTED]> wrote:
> You can actually create components using CFScript but I don't advise it!  It
> makes code that is hard to maintain.
>
>  Just do in your .cfc:
>
>  <cfcomponent>
>    variables.instance = structNew();
>
>    function setMe(me) {
>      variables.instance.me = me;
>    }
>
>    function getMe() {
>      return variables.instance.me;
>    }
>  </cfcomponent>
>
>  We have some components in my company written by a contractor (nobody was
> monitoring him too closely, argh!) which look like this, they are most dicey
> indeed.
>
>  Good luck,
>
>  Eric

--
E: [EMAIL PROTECTED]
W: www.compoundtheory.com
ICQ: 3094740


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting ( www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

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' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to