Stan wrote:
> Ok, I get it. win.end() hasn't been called
> yet when the calendar is created. I guess
> I can say Fl_Group::current(0) before
> calendar_ = new Calendar(300, 300) ?
Yes.
Though it probably just means there's a missing end()
somewhere.
When I derive widgets from Fl_Group or Fl_Window
that are 'completely defined' by the constructor
(like the calendar widget), I usually put the end()
in the group's constructor, to ensure it doesn't
'suck in' other widgets created by the caller.
It only makes sense to leave the end() to the caller
if the widget is a container of some kind, like a table
or scroller.
I don't think of the begin()/end() stuff as evil,
as long as it's understood how it works. IIRC the
fltk 1.0 manual was pretty good about describing that
whole thing. Not sure if it's still in there now.. I haven't
read the FLTK intro materials in a looong time.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk