[..]
> > What is often lost in this discussion is the fact that
> > begin(); new Thing(..); new Thing(); end()
> > is NOT exactly the same as
> > add(new Thing(..)); add(new Thing(..));
>
> I'm probably forgetting something about FLTK2; what's the difference?
I've never used fltk2. In the context of fltk1:
// Example 1
Fl_Group* g = new Fl_Group(..) // implicit begin()
g->end();
g->add(new X(..)) // adds an X* to g
// Example 2
Fl_Group* g = new Fl_Group(..) // implicit begin()
new X(...) // adds all widgets created by the execution of
// X::X() to Fl_Group::current()
g->end()
In simplistic examples, like those one would expect to find
in a tutorial, the 2 methods end up having the same result.
But they are quite different, and when applications become
complex, new users are tripped up. At least I was :)
To solve this problem with documentation, the documentation must
make the distinction very clear. (To solve the problem without
documentation, and avoid errors, just get rid of the begin().. end()
thing and make users use add() -- but we've had that discussion
before).
Cheers,
Stan
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk