> Stan wrote:
> > Where's the missing end() ?
>
>       Your end() in the ctor of DateInput ends the group,
>       but not the outer Fl_Window defined in main().
>
>       So the 'missing end()' is the one called in main().

Sorry, but that makes no sense. I was pointing out the problem
in my code snippet can't be solved by adding an end() anywhere.

[..]

I really don't want to get into an argument over this.  I happen
to think that having a single Calendar instance shared by
all DateInput instances is a reasonable design -- reasonable
people may disagree.  What is obvious to me is that I can't
implement my design without tinkering with the global "current
group."

>
>       By calling current(0) in DateInput's ctor, you're effectively
>       end()ing the Fl_Window within your ctor, which has global
>       ramifications. So watch out:

I think I understand the ramifications.  My DateInput ctor now
includes

  if(!calendar_) {
     Fl_Group *grp = Fl_Group::current();
     Fl_Group::current(0);
     calendar_ = new Calendar ( .. );
     Fl_Group::current(grp);
  }

It works.  It just doesn't make me happy.

Have a nice weekend :)
Stan

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to