On Friday, 25 April 2025 at 12:27:08 UTC, Dejan Lekic wrote:
EG, you rock as always. Thanks for this - amazing job!
And thanks to you for thinking of adding the WebKit binding.
Seems like we've reached the point where adding a binding is
pretty trivial.
However, I think the code you gave as an example is incorrect.
It should be:
```d
with(new Window) {
title = "Hello World Example";
defaultWidth = 200;
defaultHeight = 200;
child = new Label("Hello World!");
self.present;
}
```
(`window.` removed). This is all so nice and clean. Love it!
Thanks for the correction. I knew I should have actually compiled
the example ;-)
I wish we did not have to rely on "self" in our code but hey,
Walter and Co. did
not give us a good alternative... I wish some of the core devs
actually noticed my post from few weeks ago:
https://forum.dlang.org/thread/xroybbdawaojiavsq...@forum.dlang.org
Agree, it would be great if there was a way to reference the
subject of the with statement. I just read over the forum thread
you linked and see that there is an
[issue](https://github.com/dlang/dmd/issues/18890) filed over a
decade ago for this! Maybe it's a case of, if you want it, code
it yourself! ;-) Makes me wonder how difficult such an effort
would be.