i often use something like: TShape = class(TComponent); TShapeClass = class of TShape; TCircle = class(TShape); TSquare = class(TShape); procedure Something; var aShape:TShape; aClass:TShapeClass; begin Case ShapeType of 1: aClass:=TCircle; 2: aClass:=TSquare; else aClass:=nil; end; if aclass<>nil then begin ashape:=aclass.create(nil); {do stuff} end; this may not be exactly what you need, but may give you an idea or 2 :-) improvements can be made by using arrays to hold the class references/numbers etc. that gives you better compile-time checking. cya __________________________________________________ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail - only $35 a year! http://personal.mail.yahoo.com/ --------------------------------------------------------------------------- New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED] Website: http://www.delphi.org.nz To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"