Method-chaining, should the need arise, is the answer to your question.
I'll see what I can do without returntype="void" - and thanks.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Jim Flannery
Sent: Tuesday, July 06, 2004 5:00 PM
To: [EMAIL PROTECTED]
Subject: Re[2]: [CFCDev] Simple, stupid inheritance/scope issue.


Tuesday, July 6, 2004, 12:26:43 PM, one spoke:

DE> Sadly, that was almost exactly what I had before I pulled it into
the
DE> pseudo-constructor, and it still threw the same error.

DE> <cfcomponent displayname="base">
DE>   <cffunction name="init">
DE>     <cfset _hidden = "" />
DE>     <cfreturn this />
DE>   </cffunction>
DE>   <!--- read function --->
DE> </cfcomponent>

DE> <!--- child cfc exactly the same --->

DE> <!--- calling template --->
DE> <set obj = createObject("component", "child").init() />
DE> <dump var="#obj.read()#" />

DE> BZZZT - same error.

Sorry for not re-doing this with the new batch of code, but it's the
same question there.

If I change the returntype of SetValue() to "void" and don't cfreturn
anything, the cfdump above returns a struct with the value of KEY1 =
"value1". Why are you returning "this" from SetValue() (and why return
anything, since you're not setting anything to the return value,
you're just manipulating something in the unnamed scope of your "obj"
instance)?

-- 
Jim Flannery
[EMAIL PROTECTED]
http://www.newgrangemedia.com/pii



----------------------------------------------------------
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]
----------------------------------------------------------
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]

Reply via email to