lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Ctrl-Ins in wxGrid cell


From: Greg Chicares
Subject: [lmi] Ctrl-Ins in wxGrid cell
Date: Wed, 15 Jul 2020 22:09:46 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0

Let me say first of all that I really like the wxGrid census
manager so far, and consider it a big improvement. Generally
I'll speak up only when I notice something that seems odd,
but I don't want a handful of little details to obscure the
main message, which is that this looks great. I just tried
some of the actions below in the current wxDVC implementation,
and...well, this message would be ten times as long if I started
listing all the things that feel wrong there (like, what cell
has focus now? oh...no cell has focus). So thanks--great work!

Now...what should happen if I place some data on the X clipboard,
then Ctrl-Ins in a wxGrid cell, running lmi for msw under wine?

Observed behavior: Nothing happens. If I press F2 so that I'm
"editing" the cell, then pasting works as though I had typed
the clipboard contents manually into the cell.

Expected behavior: I thought Ctrl-Ins would enter "edit mode".

If I have "xyzzy" on the clipboard, and I want to paste it into
a text field like "Agent Name", it would seem natural to expect
that Ctrl-Ins alone would paste the data.

That's how a spreadsheet program would work. However, this grid
control is not a spreadsheet, because each cell is strongly
typed, and entering the wrong data type is forbidden, so we need
to consider each datatype. Thus, if I use F2-Ctrl-Ins to paste
"xyzzy" into...

 - an enumerative (drop-down combobox) column like "Agent State",
nothing happens (because "xyzzy" is not in the list)

 - a date column like "Effective Date": likewise

 - a numeric column like "Inforce Glp": the classic lmi message
(which looks like a 1990s compiler warning) appears, and pasting
has no effect (good).

 - a range-limited integer spinctrl like "Issue Age": it gets
reset to zero (ideally, I suppose, the edit would be rejected
and there would be no change)

 - a checkbox column like "Inforce Is Mec": Ctrl-Ins does
nothing, but pressing F2 toggles the value (I'm growing to
like that toggling less)

There are two matters to discuss here:

(1) Whether we might remap Ctrl-Ins to F2-Ctrl-Ins. (BTW,
FWIW, around version 8 or so, vim made just such a change:
in normal mode, Ctrl-Ins in effect maps to i-Ctrl-Ins now.)
But that's no impediment to accepting the wxGrid patch,
because the wxDVC implementation works the same way AFAICS.

(2) For the longer term, whether the old lmi code (unaltered
by the wxGrid patch) should be changed, e.g. so that pasting
"xyzzy" into an integer spinctrl doesn't reset it to zero,
or to shield end users from unfriendly messages like
  std::__cxx11::basic_string<std::char_traits<char> ...
But that's no impediment to accepting the wxGrid patch,
which isn't where these weirdnesses got introduced.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]