On Friday, Sep 5, 2003, at 09:36 US/Pacific, Ian Skinner wrote: > If I am understanding and using this correctly, a variable in a cfc > that is > declared into the "Variables" scope will be visible to all other > methods on > the CFC, but not to callers outside of the cfc.
Correct. And 'variables' scope exists for the lifetime of the CFC instance (which I think is what you really mean by 'visible to all other methods'). > A variable in a cfc that is > declared into the "This" scope is also visible to all other methods, > but > also visible and changeable from the calling code. Correct, and 'this' scope also exists for the lifetime of the CFC instance. > If one adds code such as > below, things can get confusing. > > <cfset testObj.C = "new Value"> > <cfoutput>#testObj.C#</cfoutput> Yes, it adds a new item to 'this' scope. > Is this expected and correct behavior? Yes. Although some folks question whether it is desirable :) It's how ColdFusion works with all scopes - if you can see the scope (in this case 'this' scope exposed through the CFC instance name 'testObj'), then you can add new keys to that scope. Sean A Corfield -- http://www.corfield.org/blog/ "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. http://www.cfhosting.com

