Hello,
I have this call:

<cfset APPLICATION.objects.db = 
CreateObject('component','components.db').init(dsn_users='users',dsn_guestbook="guestbook",dsn_irama="irama",maxStringLength=25)>

This is the method definition:

<cffunction name="init" access="public" output="no" returntype="any">
        <cfargument name="dsn_users" required="false" default="users">
        <cfargument name="dsn_guestbook" required="false" default="guestbook">
        <cfargument name="dsn_irama" required="false" default="irama">
        <cfargument name="maxStringLength" required="false" default="25">
        <cfset this.dsn.users="#arguments.dsn_users#">
        <cfset this.dsn.guestbook="#arguments.dsn_guestbook#">
        <cfset this.dsn.irama="#arguments.dsn_irama#">
        <cfset this.maxStringLength="#arguments.maxStringLength#">
                <cfreturn this>
</cffunction>

When later I call another method in this cfc and refer to the value of 
this.dsn.users I get the errormessage:
 
Element DSN.USERS is undefined in THIS

Strange because:
a) I set the value of this.dns. in the init method _and_ return it;
b) the init method has a returnvalue of any ("path.of.component" or "this" 
gives same result);
c) when cfdumping the variable that holds the reference to the cfc it is not 
empty - all the methods are there. Seems like it's lost it's instance data...

Does anybody know whats wrong here?

Thanks,

Marc


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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303813
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