Handling CheckBox state changes in DLangUI

brianush1 brianush1 at outlook.com
Sat Dec 31 03:05:45 UTC 2022


On Saturday, 31 December 2022 at 02:40:49 UTC, Daren Scot Wilson 
wrote:
> The compiler errors I get are, for no '&' and with '&':
>
> Error: function `app.checkbox_b_clicked(Widget source, bool 
> checked)` is not callable using argument types `()`
>
> Error: none of the overloads of `opAssign` are callable using 
> argument types `(bool function(Widget source, bool checked))`

Try:

     import std.functional : toDelegate;
     check_c.checkChange = toDelegate(&checkbox_b_clicked);


More information about the Digitalmars-d-learn mailing list