Am Dienstag, 27. November 2007 17:40 mkajdas.mkprod wrote:

>> Window wrapper classes as your TDset_Dialog should be used only for
>> top level windows
> 
> I agree with everything you said and by looking at C++ code I figured out
> the solution. The problem has more to do with writing proper Fluid code to
> avoid such issues. What is the best Fluid solution to make sure the window
> deletion is performed automatically by the generated code? 

I'm afraid, FLUID does not offer such automatic solution (at least I don't
know one), the "delete window" has to be typed in by hand. 

BTW: If a FLUID made class (widget class or wrapper class) has a function
like 
        void create_dialog() { dialogwin = new Fl_Window(...); }

which creates a top level window *optionally outside* of the Ctor, then also
the NULL initialization

        dialogwin = NULL;

has to be typed in by hand somewhere in the Ctor or an init() function 
to avoid crashes of the "delete dialogwin" in the Dtor in case the
window was not created.

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

Reply via email to