General information
Category:
Coding, syntax & commands
Title:
How to make copy of an object
1) Is there a quick and dirty way of saving an object's properties (it's state) so that they can be restored later? At this time I wish to save the properties of the _SCREEN object to restore them later, but this is obviously a frequent situation and I am sure there is a one line solution.
2) Along the same vein, is there generic way (sounds better than quick and dirty) of making a complete copy of an object? The difference with question one is that this time any objects contained in the source object are copied along with the properties.
I understand oNew = oOld does not do the trick because it simply saves a pointer to the same object.
There are two cases: In one the target object does not yet exist and in the other it already exists (assume it's of same class).
Thank you very much.
Alex
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only