Re: XForms: a spreadsheet window in Xforms ?

From: David Paigen (paigen@heathen.com)
Date: Mon May 05 2003 - 17:53:19 EDT

  • Next message: Reed Riddle: "Re: XForms: a spreadsheet window in Xforms ?"

    # To subscribers of the xforms list from David Paigen <paigen@heathen.com> :

    > I plan on developing a spreadsheet-like window, that is a window with
    > quite a number of modifiable text fields organized in row and columns.

    Yeah, Xforms needs a spreadsheet, by all means. I was once managing
    a non-performing employee who was implementing a spreadsheet based gui,
    so I know a little, certainly more than I expected to, but not a lot.

    > How should I design this window for a good efficiency ?

    In our case, the big problem turned out to be redraws. In an effort
    to minimize the redraws when one cell changed, zillions were done
    when any change effected more than one cell. It was ok to have a
    complex cell object, even very many of them, but they had to be
    smart about redraws. As smart as Mycroft.

    Spreadsheet operations fall into three basic categories:

    1. ops that change the size of any cell
    2. ops that alter the contents of several cells
    3. ops that alter the contents of a single cell

    In each case you want to prevent redraws happening for actions
    in the lower level ops and defer all redraw activity until the
    end of the last level 1 (or 2) op.

    Part of minimizing the redraws depends on being clever in how
    you design your widget. The rest of it comes from watching the
    flow of X events and adding code to prevent redraws in some
    cases.

    In the end, the inside of your code will be kind of convoluted,
    but it will be fast. I suggest that you liberally dose your
    special cases with comments about the failure mode and reasons
    why for the case. That will save a lot of headache when it comes
    time for maintenance.

    -David Paigen

    _________________________________________________
    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/
    Development: http://savannah.nongnu.org/files/?group=xforms



    This archive was generated by hypermail 2b29 : Mon May 05 2003 - 17:55:30 EDT