Replies: 3 comments 7 replies
-
|
Someone on IRC suggested: if (auto win = new Window) with(win) {
setTitle("Example");
}frankly I would rather live with what I currently do: |
Beta Was this translation helpful? Give feedback.
-
|
Just pushed support for this to gidgen and gid. I'm considering only generating packages on master on each release. The reason is because even just minor changes at this point result in rather large change sets. What do you think? It would just require that the packages are rebuilt after pulling gidgen and/or gid. |
Beta Was this translation helpful? Give feedback.
-
|
AMAZING! It was easier than I thought! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
One of the frustrating things about D is that it does not (yet) allow initialisation in the with statement, so we have to do
What we can't do in D, that would be ideal is:
with (Window win = new Window) {However, what we can do, and what I propose here is to generate a property called
selffor all classes that are children of gtk.widget.Widget. self just returnsthis.With this, our code from above becomes:
I would actually go even further and add this to gidgen as an instruction:
//!genself gtk.widget.WidgetOf course, assuming this is doable. Question for @elementgreen is - is this doable?
Beta Was this translation helpful? Give feedback.
All reactions