On Mar 14, 2007, at 6:31 PM, <[EMAIL PROTECTED]> wrote:
> void my_callback2(Fl_Widget *w) {
> if(box) box->hide();
// if you delete the box here instead, you really should set box=0L;
as well
> }
> I'd rather delete the box (and release the allocated memory)
> instead to hide it. So I replaced box->hide() with
> Fl::delete_widget(box).
Which version of FLTK are you using and on which platform? The code
seems correct to me until you click the clear buttin a second time
which *will* lead to a crash.
----
http://robowerk.com/
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk