Hi People,
I have encountered a very weird error with variables scope. 

<cfset var AnnouncementBean = 
createObject("component","mypath.announcement").init(argumentcollection=arguments)/>
and 
<cfset var AnnouncementType = 
createObject("component","mypath.announcementType").init(argumentcollection=arguments)/>

Then I dump those two objects and found that the AnnouncementBean object is the 
same as
AnnouncementType (it has properties and methods of AnnouncementType )
When I comment the creation of the second object then dump it, it show the 
correct object.

I found that because 
<cfset variables.instance = StructNew() /> is declared in both objects
and when I created the second object, this  variables.instance overrides the 
first
variables.instance was created in the first one.

To me, it's really really weird as the variables scope exists only within that 
object.

Using CFMX 7 is ok, the CF6 causes this problem. I am running in Unix.

Any help is appreciated. 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

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