This code in a GUI application compiles and runs (tested with Delphi 6 and 2009):
procedure TForm1.Button1Click(Sender: TObject);
Self := TForm1.Create(Owner);
Questions that come to mind:
- why is Self writeable and not read-only?
- in which situations could this be useful?
If you know the answer, I would be happy if you post it here or at stackoverflow.