We do this sort of thing with CFMX 6.1 all of the time, without issue. 
Sounds very odd.

We have a debug() method in each of our bean objects like this:

<cffunction name="debug" access="public" output="false" returntype="struct">
      <cfreturn duplicate(VARIABLES.instance) />
</cffunction>

Something like that. We use it all of the time to find out the current 
structure within the object, without dumping the methods. Might help in 
some way...

(also, did you check the returntype of your init() methods?)

Steve "Cutter" Blades
Adobe Certified Professional
Advanced Macromedia ColdFusion MX 7 Developer
_____________________________
http://blog.cutterscrossing.com

Michael Nguyen wrote:
> 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. 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Enterprise web applications, build robust, secure 
scalable apps today - Try it now ColdFusion Today
ColdFusion 8 beta - Build next generation apps

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

Reply via email to