XForms: Problem noifying end of input.

From: Dick Middleton (dick@sqf.hp.com)
Date: Mon Jan 15 2001 - 08:38:21 EST

  • Next message: Steve Lamont: "Re: XForms: Problem noifying end of input."

    # To subscribers of the xforms list from Dick Middleton <dick@sqf.hp.com> :

    > # To subscribers of the xforms list from Steve Lamont <spl@ncmir.ucsd.edu> :

    > > I have an applications with about a dozen input objects on a tab. It also
    > > has a pile of buttons.

    > > Pressing a button can change which data set is displayed (its a form of tree
    > > navigation) so its vital to collect any changes.

    > So, why don't FL_RETURN_CHANGED or FL_RETURN_ALWAYS satisfy your
    > requirement for notification? Am I missing some subtlety here?

    Yes! But that's probably because you don't use callbacks on your input
    fields.

    The problem is that the interactive behaviour of an input field is different
    depending on whether the user changes input focus from the input field to
    another input field or to some other type of object.

    If you have 2 input fields and a button then:
        a) If you enter data in an input field and click to the other input
           callback will be invoked.

        b) If you enter data in an input field and click the button the callback
           will not be invoked.

    I.e. for the data to be accepted from one input field the user has to first
    click the other input (or key tab or cr) before clicking the button.

    The problem with your scheme where all inputs are read when the button is
    pressed is that the facility provided by xforms of invoking a callback as and
    when the input data is changed is lost. That may not be useful in your
    application but in many it is.

    To emulate the RETURN_END_CHANGED behaviour within the application, even a
    simple one, is non-trivial.

    BTW this raised an eyebrow (from earlier email):

    > In all the XForms code I've written I don't think I've ever used or
    > found a need for a callback on an Input object.

    No file selectors or other input goodies used in your app then!

    Dick

    oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
    o o
    o Dick Middleton o
    o email: dick_middleton@agilent.com o
    o Phone: +44 131-331 7530 o
    o Fax: +44 131-331 6366 o
    o Agilent Telnet: 313-2530 o
    o o
    o Agilent Technologies o
    o CSSD Total Instrument Support o
    o +31 20 547 2200 o
    o ots-europe@agilent.com o
    o o
    oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
    _________________________________________________
    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 : Mon Jan 15 2001 - 04:42:46 EST