The method needs to return THIS or Rick's code in the previous post will fail.

<cffunction name="init">
<cfargument name="dsn">
<cfset variables.dsn = arguments.dsn />
<cfreturn this>
</cffunction>

On Fri, Jun 20, 2008 at 5:34 AM, Matt Williams <[EMAIL PROTECTED]> wrote:
> On Thu, Jun 19, 2008 at 4:27 PM, Rick Faircloth
> <[EMAIL PROTECTED]> wrote:
>> That was it!  Thanks Josh and Mark.
>>
>> Ok... concerning createObject, etc.
>>
>> I tried again with this line:
>>
>> <cfset managers = createObject("component",
>> "c21-ar-sm-homesite.components.manager_authorization").init(application.dsn) 
>> />
>>
>> but I got this error:
>>
>> The method init was not found in component
>> E:\Inetpub\webroot\c21-ar-sm-homesite\components\manager_authorization.cfc.
>>
>> How do I write the "init" method for the db in the component?
>
> <cffunction name="init">
> <cfargument name="dsn">
> <cfset variables.dsn = arguments.dsn />
> </cffunction>

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307813
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to