Title: Message
TMetafile.create should get called, and does if i test your code?? sorry can't help,  but your example is functioning correctly
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Jianming Lin (ASL)
Sent: Thursday, 17 October 2002 4:36 p.m.
To: Multiple recipients of list delphi
Subject: [DUG]: polymorphism problem


 
G'Day, guys, 
 
procedure TryMetadata(ImgType : Integer);
var NGraphic: TGraphic;
    GraphicClass: TGraphicClass;
begin
  ImgType := 1;
  case ImgType of
    1 :  GraphicClass := TMetaFile;
    2 :  GraphicClass := TBitmap;
  end;
  NGraphic := GraphicClass.Create; 
end;
 
 
Why constructor  of TMetafile.Create is not called instead only TObject.Create is called?
 
 
 
  
[Jianming Lin (ASL)] 
 
 
  

This e-mail message has been scanned for Viruses and Content and cleared by MailMarshal - For more information please visit www.marshalsoftware.com

Reply via email to