Like it states there.
I need to duplicate an object at its base CLASS and call the constructor of the "ClassType"!
I can do that and the object gets created with the descendant classes and the overloads do get executed however,
I cannot get the constructor to execute at the top level; it only wants to execute starting at the base class.
I have a BASE class that is a proxy to all the descendant classes and these are all linked via virtual overrides so that all functions reach these
descendant's functions.
The DUP function needs to recreate the class with its Descendants at the base class, and it does that.
I've used the CLASSTYPE.Create, CLASSTYPE.Newinstance with the Initinstance etc, all work and when I execute the Assign override that also goes to the descendant class but none of the dynamic items have been created because the I can't get the top-level constructor to call.
Result :=TbaseObject(ClassType.NewInstance);
Result :=TbaseObject(ClassType.InitInstance(Result));
Result :=TBaseObject(Result).Create(Parent);
Result.Assign(self);
Only the TbaseObject.Constructor gets called when I do this, It will not start at the top.
Any Ideas?
Jamie