So I want to add a Copy/Paste function to my Delphi application that draws different shapes and does stuff with them.
Here's the on even handler for the Copy menu item:
procedure TForm1.Copy1Click(Sender: TObject);
begin
Clipboard.Open;
if SelectShape <> nil then
clipboard.SetComponent(SelectShape);
Clipboard.Close;
end;
And I get the error:
Incompatible types: 'TComponent' and 'TBaseShape'
TBaseShape is the ancestor class for all shapes in my application
I have no idea why it doesn't work...