[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi] Porting the ancient ihs product editor to lmi
From: |
Greg Chicares |
Subject: |
[lmi] Porting the ancient ihs product editor to lmi |
Date: |
Wed, 3 Apr 2019 14:25:07 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 |
[Vadim and I were talking off-list about replacing lmi's current
product editor with a simple wx port of ihs's, ihs being an
ancestor of lmi that used a non-free GUI library. I'm pasting a
message I sent last night (with minor edits) so that we can
continue the discussion on the public mailing list.]
Let's list the differences when "CurrCOITable" is examined.
ihs: "Item: CurrCOITable" in static control above tree control.
We should delete that--it's useless: I can see which item is
focused in the tree control already.
"Current mortality charge..." description:
ihs: below tree control
lmi: above grid control
Visually, lmi seems better in this respect. However, expand the
"Withdrawals" branch and select "MaxW[Dd]Ded": ihs shows the full
description, but lmi's description is truncated, and truncation is
a Really Bad Thing. It might be ideal to use the same position as
lmi, without truncating.
Seven-row array of controls between tree and grid:
ihs: [checkbox] [combobox]
lmi: [static] [combobox] [checkbox]
Here, the ihs layout is better. And ihs has better navigation:
- Tabbing through the checkboxes, ihs highlights the current
one, but lmi has no highlight.
- Click the "Class" checkbox in lmi: the window resizes, because
the combobox becomes visible and is taller than other controls
in its row. Note that you can't click this checkbox in ihs,
and that calls for an explanation...
To make the following discussion clearer, let's recognize that
both editors are necessarily modal. One mode (#1) lets you change
the axes across which data vary, and the other (#0) lets you view
the data array and modify cells. The frequency with which these
modes are used, by type of user, is probably:
expert other
users users
95% 99% mode #0: just view the data (as if it were read-only)
5% 1% mode #0: actually modify individual cells
0.1% 0.01% mode #1: change axes
Maybe I've slightly understated how often mode #1 is used, but
not by much. It's like vim's dreaded "ex" mode: you rarely want it;
it's probably very dangerous; you stumble into it only by accident,
and when you do, your only wish is to get back to normal reality.
Now, *you* might use "ex" mode, as I might use mode #1 here, but
we're specialists.
Unique to lmi are the "X axis" and "Y axis" controls. They're in
the wrong order: row should be above column, even though 'X'
alphabetizes before 'Y' (and we really should have said "Row" and
"Column" instead, because that would be less confusing to end
users). Focus the "X axis" one, and press down-arrow: that means
"transpose", at least for two-dimensional data. Now press up-arrow
twice: that means "change mode"--it enables a combobox below,
enabling selection of a "Gender" hyperplane. Next, try clearing
one of the checkboxes--oh, no, we're in "ex" mode! Worse, if you
check an unchecked checkbox ("UW basis", for example), you just
executed a command in "stealth ex mode": now you can scroll
through {Medical, Paramedical, ...} and nothing seems to happen
(the displayed table doesn't change), but you actually have
changed the dimensionality of the universe, as you discover when
you clear "UW basis": the warning explains that you did something
wrong a few steps back and may not be able to recover. None of
this seems natural to me.
The ihs interface instead has an explicit "Change axes" pushbutton.
It's as though gvim had a pushbutton to enter "ex" mode, which
couldn't be entered without this deliberate action. (Well, I guess
it probably does; or at least it requires some keyboard command
that isn't often issued by accident, and which the cautious could
disable. And if you stumble into it by misadventure, it prints a
message explaining how to get out, which brings us to...) The other
pushbutton, "Revert item", is most comforting after having used the
lmi GUI: it undoes changes to data and even to axes. Both of these
pushbuttons are Really Good Ideas.
Now make some item vary across three axes. Try it with ihs, then
with lmi, and tell me you like lmi's way better--I dare you.
Click one of the ihs checkboxes--you're not in mode #1, so this
can't change the dimensions, because that just can't happen in
mode #0. You'll soon discover that {0,1, or 2} checkboxes can be
checked, and you'll probably realize that's because your screen
is flat and the grid control is two-dimensional. Now click one
of the lmi checkboxes--hah, gotcha!
And ihs did all of this with far less code, using nothing but
a subset of C++98 along with a GUI library no more powerful
than wx. Only one class. No templates except the STL. No boost.
The longest function body in 'ihs_dbview.cpp' is about eighty
lines, and most are short enough to fit on one twenty-four line
screen.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi] Porting the ancient ihs product editor to lmi,
Greg Chicares <=