> >    Fl_Widget *w =3D Fl::pushed();
> >    Fl_Window *win =3D w->window();
> >    while(win->window()) win =3D win->window();
> >
> > .... This seems to be as far as we get before it dies...
> 
> Could it be that your palette is nothing more than a window
> with nothing inside? Fl::pushed() would return the window,
> w->window() would return NULL,
> and while(win->window()) would crash on dereferencing a NULL pointer.
> 
> This would be corrected by:
>   Fl_Widget *w = Fl::pushed();
>   Fl_Window *win = w->window();
>   if(win == NULL) { win = (Fl_Window*)w; }
>   else { while(win->window()) win = win->window(); }

Yes, I think it must be something like you suggest... I can certainly
add a defensive check as you suggest and see if that helps: I'll do that
later today, I hope.

The tool palette's are Fl_Double_Windows filled with lots of little
(Fl_Box derived) widgets, so I was expecting that the "active" widget
would be derived from Fl_Box and would have a parent window, though...

SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

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

Reply via email to