I don't think I am actually understanding the question at hand, but
hopefully this will at least help you out.

First of all, I would strongly discourage anyone from using the "this" scope
of the CFC.  There are a variety of reasons for that recommendation, but
chief among them is the ability to access and change the instance data from
outside of the object.

Instead, you will want to use the "variables" scope, and have getX() and
setX() methods to access/change the instance data.

Now then, if you are wanting a struct representing the instance data, then
you would create a getMemento() method to return that, which would look
something like the following:

public struct function getMemento()
{
     // duplicate it so the internal data cannot be changed outside of the
object
     return duplicate(variables);
}

These are just general guidelines and may/should change based upon your
actual needs.

HTH


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337880
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to