4 ms·
Er... on the window, as the indentation and API tells you. It may be "not exactly obvious" to you, but having been doing GUI programming for a long time, this
by julian_t 10y ago
Er... on the window, as the indentation and API tells you.
It may be "not exactly obvious" to you, but having been doing GUI programming for a long time, this makes complete sense to me. It is also, of course, a matter of personal style and preference.
(Aside: some friends tell me, a vi user, that the way Emacs works is obvious. I disagree, but then, I don't use it).
And as for "modern"... I've been using this since C++ gained references.
- golergka 10y agoAre you sure? Because to me it looks that first call should return a canvas, and all consecutive calls operate on it.
- Stratoscope 10y agoThe indentation misled you here. The first method call returns a child canvas object that the other methods act on. See my comment nearby in this thread for an alternative way to indent that avoids this confusion.
- golergka 10y agoI think it just proves my point. Do we really want indentation to be that critical to making code readable?