On Saturday, 31 December 2022 at 03:05:45 UTC, brianush1 wrote:
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);
That works :)