from what I understand you can do this:
<cfcomponent>
<cfscript>
init();
</cfscript>
<cffunction name="init">
your code here
</cffunction>
</cfcomponent>am I wrong about this?
On May 23, 2004, at 7:17 PM, Barry Beattie wrote:
hi all
is there no way of passing parameters into a CFC on invocation?
At present I've got an init() method that takes in application DSN and session security info and returns THIS.
eg: <cfset objReqAdmin = createobject("component", "#APPLICATION.componentPath#.reqadmin").init(APPLICATION .dsnInfo, SESSION.userinfo)>
Without these, the component methods should not function so I've got a kludgy <cfif isInitialised> at the top of every method to stop use without initialising first. not the neatest solution.
Without resorting the CFCs accessing session and application scopes directly (bad news in my book), is there no other way?
thanx barry beattie
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com).
An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
