On 5/9/05, Threetwosevensixseven <[EMAIL PROTECTED]> wrote: > ConcreteClass: TClass; > ConcreteClass := ConcreteInstance.ClassType;
Hey! I'm not so sure about this, but I think that what is beeing called on your code is "TObject.Create" since TClass is a "class of Object"... And as the Create method of TObject isn't a virtual nor dinamic method, it just calls that simple method that has no code inside... Since TObject is the base of everything you dont get any problems, but I think your constructor will never be called :) My suggestion is to create a base class and a class type for it... And then inherit everything that you need from this base class... Something like: TCloneable = class constructor Create; VIRTUAL; : end; TCloneableClass = class of TCloneable; TICanCloneMyself = class( TCloneable ) constructor Create; OVERRIDE; : end; Then you'll be able to do such code: Class: TCloneableClass; : Class := TCloneableClass( UnknownObject.ClassType ); OtherObject := Class.Create;//I think it will call the virtual method, which can be overrided... I didn't tested anything, maybe a more experienced guy can help you, I'm just a beginner, I've learned how to program 4 years ago with javascript :))) -- "ME ALIMENTE [http://br-linux.org/noticias/002750.html] hehe" "Invente, Tente!!! Fa�a um c�digo eficiente" (Jonas Raoni haha) Jonas Raoni Soares Silva --------------------------- Desenvolvedor de aplica��es jonasraoni at gmail dot com http://www.joninhas.ath.cx:666 ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

