Dave Merrill wrote:
CFC newb here again.
Am I right that there's no way to control access to cfc functions written
like this:
--------------------------
<cfcomponent displayname="my_cfc">
<cfscript>
function my_function() {
// do stuff here
|
<cfscript>
</cfcomponent>
--------------------------
Correct - and I wouldn't write any CFCs in full cfscript like your example.
Tou have to do it like this:
--------------------------
<cfcomponent displayname="my_cfc">
<cffunction name="my_function" access="private">
<cfscript>
//do stuff here
<cfscript>
</cffunction>
</cfcomponent>
--------------------------
This is more acceptable. Also, be sure to include output="false" and a
returntype if you want data checking on the return. I'd also recommend
writing at least a short comment in the hint="" attribute. This is
useful is the future for documentation and well as the CFC browser
that's builtin to CF.
Thanks, just want to make sure there's no relevant language feature for this
that I don't know about.
Dave Merrill
Don't forget to var function related variables including qry names and
index counters.
.pjf
--
Peter J. Farrell :: Maestro Publishing
blog :: http://blog.maestropublishing.com
email :: [EMAIL PROTECTED]
phone :: 651-204-0513
Not a computer nerd; merely a techno-weenie.
--
----------------------------------------------------------
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).
An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]