[Date Prev][Date Next][Subject Prev][Subject Next][
Date Index][
Subject Index]
Re: variant
- Subject: Re: variant
- From: Harry Binswanger hb@xxxxxxxx
- Date: Wed, 22 Dec 2004 21:37:30 -0500
Carl wrote:
You detect a particular keystroke by testing
for its Key Code
(unshifted Scan Code), or VA$KC:
Aha. That's an excellent idea for how to transcend whether the cursor is
in the text or on the CM line.
See what you got
yourself into, Harry? I warned you about tradeoffs galore.
Here's
Tradeoff #1: Now you have to rewrite all of your XPL to use VA$KC.
Fortunately, the word processor I use makes that kind of change easy to
accomplish.
(Which, of course, is how it
should have been written in the first
place, if you wrote it for Xy4.)
> Hmmm. Wouldn't it be possible to do the ultimate fix here?
What
> if U2 gets triggered if and only if there's no regular Xy
> command found for the string entered? Something along the
lines
> of:
>
> IF VA$ER = 12 then ...
It may be *your* ultimate fix. But there are steep costs here,
too,
as I suggested in my earlier post. A biggie is that you can't
use
this sort of helpkey to launch a U2 framename that's identical to a
native command. There are plenty such framenames, and some of
them
are highly useful if not critical. You can rejigger the helpkey
so
that framenames have priority over native commands -- but then you
can't execute any native command that happens to be identical to a
framename. Not good, either.
But the framenames are easily modifiable. So at worst, I change framename
dir to dir. (with the trailing period) or diru or whatever, but I don't
otherwise have to type the trailing period.
You'll find that this
"ultimate" helpkey is a tricky thing to code
-- not just a matter of testing for VA$ER==12. You've got to
worry
about suppressing unwanted error messages, not smothering relevant
error messages, avoiding bad beeps, and keeping good beeps.
And
then there's the problem of preserving informational PRompts if a
native command succeeds while suppressing the Error 12 PRompt (and
only that PRompt!) if the command fails. Good
luck.
Well, there's always the brute force way: put in a table of every legit
Xy command (excluding arguments), then only do the frame if its not on
the list. I'll bet there's a list of them in U2. Ah, help
commands brings them all up. All of them take up only 1667
bytes. I'd add to the list any string that begins with VA or
VA/NV.
> This change, if it is
feasible, would have a climactic effect:
> virtually merging U2 with the factory code. No longer would a
> user have to remember (or even know) if a given command was
> built-in or U2-ed in by Carl and Robert.
Sounds about as desirable as acid rain.
C'mon, I said "climactic" not "climatic."
We'd prefer that users
be
aware when they're using U2, and distinguish clearly between that
set of tools and built-in commands.
We've been around this block many times before, Robert and I --
tried all kinds of Helpkey-XC configurations.
I didn't know that. I simply had an apriori notion of "full,
seamless integration" of U2 with Xy. But you're saying that in sum
total it isn't advisable. Could be.
But we always came
back to separate keys for commands and franemanes as the cleanest
arrangement with the fewest compromises. But... live with your
idea
for a while and decide for yourself.
I probably won't have time to try it, but I'm sorely tempted to do it
with the command list (though that is inelegant in the extreme).
Thanks very much for the idea.
Harry Binswanger
hb@xxxxxxxx