About the only use for getMemento() method I have is as a kind of CFDUMP of the current data contained within an object. As a debugging device to check that the values of the various parameters actually are what i think they should be.
In that case, the getMemento() method should always return the getters, otherwise all you ever see is the default values, not the current values. Otherwise, I only ever use a getter or two in a process, or pass an object around, as Sean said. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month On Wed, Nov 17, 2010 at 12:57 PM, Sean Corfield <[email protected]> wrote: > > On Sun, Nov 14, 2010 at 11:03 AM, Dave Merrill <[email protected]> wrote: >> In the cfproperty-oriented world, where properties get dumped into the >> variables scope along with your methods and anything else there, many >> folks including me have written getMemento methods to return a struct >> with the values of the object's declared properties, only. > > Why? > > If you wanted a struct, why use an object in the first place. If you > wanted an object, why provide a method that un-encapsulates the data? > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:339302 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

