General information
Category:
Object Oriented Programming
>I want to generically clone any object on a form on to a second (child) form conditionally at run time. Since the object is not a class I cannot use "AddObject', and since I want to do it at RunTime, I cannot use 'CloneObject'
>I can copy all it's properties using a Loop, but not it's methods.
Considering how VFP's containership works with forms, I don't think you can do what you want in a pure sense. The closest I can see is to AddObject an empty member from the same base class, and then transfer the property values. This probably isn't adequate, unless your needs are fairly simple. Also, are you expecting after the child window closes, that any changes to the clone are reflected back on the object in the parent form? That would be harder still, since you could re-transfer some properties, but the sequencing of events and methods would be near impossible to simulate.
Good luck. Maybe if you describe what you're trying to accomplish, someone will have a different idea.
-- Randy
Previous
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