XForms: Problem with second form cratering app.

From: Jeff Pierce (wd4nmq@comcast.net)
Date: Sun Dec 01 2002 - 19:15:40 EST

  • Next message: Steve Lamont: "Re: XForms: Problem with second form cratering app."

    # To subscribers of the xforms list from Jeff Pierce <wd4nmq@comcast.net> :

    Ok, now that I have verified this new address on the list I can post
    this :-).

    I have a strange problem with xforms 0.89.

    I have an amateur radio app that works fine until I add a second form.

    I have the main form working fine and I wanted to add another form that
    would get text search information. I created it, call it search, with
    three items. An input and two buttons. One labeled "Find" and one
    labeled "Cancel". All three use the same callback, doSearch(). Each
    passes a different argument to tell who called doSearch().
    Ok, I put a buttun on the main form to launch the search form here are
    the two functions.

    void showSearch(FL_OBJECT *ob, long data)
    {

     fl_set_input(fd_search->target, "");

     fl_show_form(fd_search->search, FL_PLACE_MOUSE,
                  FL_TRANSIENT, "Search");

    }

    void doSearch(FL_OBJECT *ob, long data)
    {
     char line[80];

     strcpy(line, fl_get_input(fd_search->target));
     puts(line);

     fl_hide_form(fd_search->search);

    }

    This is just test to see if I am getting it right. So, I start the app
    and select the button to launch the search form. it appears. I test it
    several times by clicking each of the two buttons and an "enter key" in
    the input area. The form disappears like it should.
    OK, now the problem. If I enter ANY text in the input field and click
    EITHER button, the app craters with:

    In fl_hide_form [forms.c 843] recursive call ?
    X Error of failed request: BadWindow (invalid Window parameter)
     Major opcode of failed request: 10 (X_UnmapWindow)
     Resource id in failed request: 0x0
     Serial number of failed request: 120464
     Current serial number in output stream: 120466

    Also whatever I typed in the input is printed on the launching window
    TWICE, not once.

    If I enter text and hit the enter key instead of a button, everything
    works fine, Tne text is printed and the form dissappears like it should.

    What am I doing wrong?

    -

    -- 
    Jeff, wd4nmq
    wd4nmq@comcast.net
    mywebpages.comcast.net/wd4nmq
    

    _________________________________________________ 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 : Sun Dec 01 2002 - 19:18:21 EST