Anonymous methods
Like property expressions and array operations, anonymous methods was introduced in QTX as a means to improve compatibility with JavaScript.
Both Delphi and Freepascal support anonymous methods but QTX has one advantage over these native compilers, namely that there is no "of object" or "reference to" definition required.
There is no "of object" in Quartex Pascal. Anonymous methods can be applied much broadly than under native compilers, covering events, anonymous procedures and delegates.
So under Quartex the example below is perfectly valid:
constructor TQTXMobileForm.Create(..);
begin
Inherited Create( .. );
fHeader := TQTXAppHeader.Create(self, nil);
fHeader.BackButton.OnClick := procedure (Sender: TObject)
begin
Showmessage('You clicked the back button');
end;
end;