[fpc-pascal] named parameter
Martin Schreiber
mse00000 at gmail.com
Sat May 27 11:54:30 CEST 2017
On Saturday 27 May 2017 11:30:38 Ryan Joseph wrote:
>
> can you show an example of this? Just curious.
>
In MSEgui most of the public widget methods an method properties use this
approach.
"
type
keyeventinfoty = record
eventkind: eventkindty;
key,keynomod: keyty;
chars: msestring;
shiftstate: shiftstatesty;
eventstate: eventstatesty;
timestamp: longword; //usec
end;
[...]
twidget = class(tactcomponent,iscrollframe,iface,iassistiveclient)
[...]
procedure dokeydown(var info: keyeventinfoty); virtual;
"
"
type
tactionwidget = class(twidget)
[...]
property onkeydown: keyeventty read fonkeydown write fonkeydown;
"
https://gitlab.com/mseide-msegui/mseide-msegui/blob/master/lib/common/kernel/msegui.pas
https://gitlab.com/mseide-msegui/mseide-msegui/blob/master/lib/common/widgets/msewidgets.pas
Martin
More information about the fpc-pascal
mailing list