Greg Ercolano schrieb:
> Andreas Schömann wrote:
>> Greg Ercolano schrieb:
>>>     But most everyone uses the begin/end stuff in fltk;
>>>     it works well, and I've never seen it be a problem.
>> Imho a newbie runs into problems with this nearly 100%. As soon as you 
>> start to write your own composite widgets without Fluid you will hit 
>> this problem, sooner or later. 
> 
>       I think the issue here is newbies aren't seeing this in the docs.
> 
>       If it's put right up front in the intro, no one should run into
>       it as a problem (unless they skip the docs, in which case they
>       should expect to flounder)
> 
>       I think the missing bit is here:
>       http://fltk.org/documentation.php/doc-1.1/basics.html#3_1
>       ..that section should really cover the meaning of begin() and end().

My suggestion is to also put clear instructions for building a Group in 
the Description section of 
http://fltk.org/documentation.php/doc-1.1/Fl_Group.html#Fl_Group

It could read like this:
"When adding child widgets to a Group take care to surround the childs 
with begin() and end():

Fl_Group::Fl_Group(x, y, w, h, label)
{
   begin()
     ...add your widgets here
   end()
}

CAUTION: forgetting the end() statement leads to serious application 
misbehaviour that is hard to debug!


> 
>       I'll made an STR #1718.
>       http://fltk.org/str.php?L1718
> 
>       Anyone want to take a shot at what the intro docs should say
>       about this? Once we have something here that seems right,
>       we can add it to the STR as a suggestion, so that it gets
>       taken care of.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to