Re: XForms: fl_free_form

From: Steve Lamont (spl@szechuan.ucsd.edu)
Date: Fri May 12 2000 - 17:24:55 EDT

  • Next message: jprinos@dehavilland.ca: "XForms: pixmaps and screens"

    # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

    > Last precision : this problem with fl_free_form (applied to
    > usual FL Forms of course) seems to appear in prgs using OpenGL windows (i
    > can't see any relation... but who knows ? :) )

    Are you using a glCanvas object? I was under the impression that this
    problem had been fixed, but I had problems some time ago with deleting
    Forms with glCanvases. Here's the hack I use:

        void destroy_form( FL_FORM *form )
        
        {
        
            if ( form ) {
        
                    void *dui = form->fdui;
                    FL_OBJECT *obj = form->first;
                    
                    /*
                     * This hack necessary because it appears that the cleanup
                     * routine is otherwise called after the window is destroyed!
                     */
                    
                    do
                        if ( ( obj->objclass == FL_CANVAS ) ||
                                 ( obj->objclass == FL_GLCANVAS ) )
                                fl_hide_object( obj );
                    while ( obj = obj->next );
                    
                    fl_hide_form( form );
                    fl_free_form( form );
                    free( dui );
        
            }
        
        }
        
                                                            spl
    _________________________________________________
    To unsubscribe, send the message "unsubscribe" to
    xforms-request@bob.usuhs.mil or see
    http://bob.usuhs.mil/mailserv/xforms.html
    XForms Home Page: http://world.std.com/~xforms
    List Archive: http://bob.usuhs.mil/mailserv/list-archives/



    This archive was generated by hypermail 2b29 : Fri May 12 2000 - 17:29:55 EDT