On 11.06.2012, at 19:56, jseb wrote:
> // with «Fl_Widget *w»
> if (Fl_Select_Browser *b = dynamic_cast<Fl_Select_Browser *>(w)) {
> // it usually works , but not this time with Fl_Select_Browser
> }
>
> Here, w is still a «Fl_Browser» and cannot be subclassed to
> Fl_Select_Browser.
> Well, that's what i guess (i'm not a C++ guru even if i try and improve ;) )
Fl_Browser, and all the vrowser selection types (select, multi) are all exactly
the same. Only the type() filed is set differently. Just use Fl_Browser
everywhere and you are fine. dynamic_cast<Fl_Select_Browser *>(w) of course
returns NULL because the class is Fl_Browser with type() set.
Sorry, it's in the history o FLTK/FL/Forms.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk