[thelist] Dw MX concensus
Raymond Camden
jedimaster at macromedia.com
Tue May 14 07:19:00 CDT 2002
> <tip type="ColdFusion" author=".jeff">
>
> written alot of udf's for cf5 but frustrated that you can't
> perform any
> actions that require calling a cftag like a query or reading
> a directory?
> well, cf6 allows you to write functions using tags now.
> theoretically you
> could write a function for every cf tag and no longer have to
> use any tag
> based coldfusion (except for <cfscript> blocks) in your cf coding.
>
> once again, get a bunch of cf6 tag-based functions at
>http://cflib.org/.
Just one small comment. The tag-based UDFs at cflib.org work fine in the
release candidate, but use hacks to get around the lack of a var scope
in that version. The final version of CFMX will have a "proper" way of
doing var scoping in tag-based UDFs. So, if you have downloaded these
UDFs, I highly recommend you upgrade when CFMX is finally released.
For those who are interested, this is how you will do var scope in
tag-based UDFs:
<cffunction name="buySWTickets" ......>
<cfargument .....>
<cfset var x = 1>
<cfset var y = 1>
<cfset var result = structNew()>
.... udf logic ....
</cffunction>
=======================================================================
Raymond Camden, ColdFusion Jedi Master for Macromedia
Email : jedimaster at macromedia.com
Yahoo IM : morpheus
"My ally is the Force, and a powerful ally it is." - Yoda
More information about the thelist
mailing list