Источник:
http://alexvoy.blogspot.com/2022/02/...n-in-form.html
==============
This can be used as a copy-paste pattern, when you need to change a standard method for new form controls added as a form extensions.
At the form initialization step we can overload any form control methods with registerOverrideMethod.
[ExtensionOf(formStr())]
public final
class my_MyNewButton_Extension
{
public void init()
{
next
init();
// MyNewButton button added in an extension to
FormButtonControl myButton =
this.design().controlName(formControlStr(, myNewButton));
// Here we can overload its standard clicked() method in run-time
myButton.registerOverrideMethod(methodStr(FormButtonControl, clicked), formMethodStr(, myNewButtonClicked),
this);
}
public void myNewButtonClicked(FormButtonControl _sender)
{
_sender.clicked();
}
}
Check this article for more complicated scenario
https://alexvoy.blogspot.com/2018/09...thods-for.html
Источник:
http://alexvoy.blogspot.com/2022/02/...n-in-form.html