Hi,
the following procedure works perfectly in an other project (onCreate event):
procedure TfrmMain.FormCreate(Sender: TObject);
begin
TfrmMain.Caption := 'Editor';
end;
However, in my new project the compiler doesn't like that:
unit1.pas(101,20) Error: Only class methods, class properties and class variables can be referred with class references
unit1.pas(101,20) Error: Only class methods, class properties and class variables can be accessed in class methods
If I change the code to the following:
procedure TfrmMain.FormCreate(Sender: TObject);
begin
TfrmMain.Caption := 'Editor';
end;
it compiles and seems to work.
What is that? What am I missing?
Yours,
Dietmar