Thanks, Charlie...that worked. The tutorial has an error in the name.
> -----Original Message----- > From: Charlie Griefer [mailto:[EMAIL PROTECTED] > Sent: Saturday, June 21, 2008 4:44 PM > To: CF-Talk > Subject: Re: Why would this cfc code give this error? > > you named your object "variables.obj". you'd need to dump > variables.obj (not variables.object) > > On Sat, Jun 21, 2008 at 1:40 PM, Rick Faircloth > <[EMAIL PROTECTED]> wrote: > > Here's the calling page code: > > > > <cfset variables.foo = 0 /> > > <cfset variables.obj = createObject("component", "Object").init() /> > > <cfdump var="#variables.object.getVariablesScope()#" /> > > > > Here's the CFC code: > > > > <cfcomponent output="false" name="Object" hint="Simple CF Object"> > > > > <cffunction name="init" access="public" output="false" > > returntype="Object" hint="constructor"> > > <cfreturn this /> > > </cffunction> > > > > <cffunction name="getVariablesScope" access="public" output="false" > > returntype="struct"> > > <cfreturn variables /> > > </cffunction> > > > > </cfcomponent> > > > > I'm following a tutorial at IKnowKungFoo.com and the code there gives the > > dump charts > > showing "GetVariablesScope", "Init", and "This", etc... > > > > However, I'm getting this error: > > > > Element OBJECT is undefined in a Java object of type class > > [Ljava.lang.String;. > > > > The error occurred in E:\Inetpub\webroot\wsm-dev\cfc\caller.cfm: line 21 > > > > 19 : <cfset variables.foo = 0 /> > > 20 : <cfset variables.obj = createObject("component", "Object").init() /> > > 21 : <cfdump var="#variables.object.getVariablesScope()#" /> > > 22 : > > 23 : > > > > Thanks for any help! > > > > Rick ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:307918 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

