I have quite a bit of code written for ColdFusion 8 that fails in ColdFusion 10. I understand that CF9 and later versions treat the Local area differently from the previous one. My problem is that I encoded functions to extend each, in the sense that child instances inherit variables from the parent. But just to clearly indicate what I mean, let me give an example of what works and how it does not work in CF10.
Take two CFCs, a child CFC that extends the parent CFC:
<cfcomponent displayname="Parent">
<cffunction name="SomeFunction" output="yes">
<cfset local.parent_val = "Declared in parent instance">
</cffunction>
</cfcomponent>
<cfcomponent displayname="Child" extends="Parent">
<cffunction name="SomeFunction" output="yes">
<cfset local.child_val = "Declared in child instance">
<cfset Super.SomeFunction() />
<p>#local.child_val#</p>
<p>#local.parent_val#</p>
</cffunction>
</cfcomponent>
Called as:
<cfset ChildCFC = CreateObject("component","Child") />
<cfoutput>#ChildCFC.SomeFunction()#</cfoutput>
In CF8, I get:
Declared in child instance
Declared in parent instance
In CF10, I get:
Declared in child instance
[error dump showing "Element PARENT_VAL is undefined in LOCAL."]
, CF10 ( "" ) , , , CF8.
, : , ? , , ?
, "" , , SUPER ( ). , CF8 , .