[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: The value of $X



Carl wrote:
It's $X that gives ever-so-
explicit priority to native commands, by forcing native execution
when the command could be issued either way, native or U2. $X walls
you off -- albeit with an escape hatch -- from any U2 routine that's
named identically to a native command (typically because it's
intended to be a replacement -- with significant enhancements -- for
the native command; see, notably, Robert's frames CH*,CI*,CV*,SE*)
It happens that I've never investigated the U2 versions of same-named
routines. I just noticed the CH* etc. frames about two days ago. So for the
way I have been using Xy, the $X frame means only enhancement, no loss.
I am now curious about the same-named routines. If I decide to use such, I
still have the old  on the same key it used to be on. So it's
win-win. Another tack would be to add a unique identifier to the list of
accepted frame-names, e.g., CH2, CI2, or whatever. Yes, I realize that
approach is fraught with the peril (can you be fraught with anything other
than peril?) of name conflict, but that peril can be de-fraught.
Putting it another way, the goal is not to eliminate the need to ever use
the . The goal is not to have to switch back and forth repeatedly,
in regular operation, between the  and the ENTER key.

--Harry
By contrast, with separate eXeCute and Helpkeys you have unfettered
access to *all* U2 resources and all native commands, without
exception (and with no need to preface native commands with "U2 " to
force Helpkey execution -- the aforementioned escape hatch). Yes, $X
can be a convenience, but it comes at a price, as you note at length
in your post. Call it a palpable advance or a PITA; opinions on that
will vary.

Having ironed out the kinks in $X, I've adopted a best-of-both-
worlds approach: reverted to my usual dedicated eXeCute and
Helpkeys, but assigned Q8$X to Enter key #28 (with a standard Enter
key assignment elsewhere on the keyboard). For me, that's value-
added that doesn't get in the way.

BTW, do you find that constantly swapping KBD files leads to OOM
(Out-Of-Memory) errors and ultimately renders XyWrite unstable? I've
never tested that rigorously, but it might be a risk. In my
experience, repeatedly LOADing and reLOADing the KBD file eventually
spells dOOM (although it may be a case of post hoc ergo propter
hoc). You'd be well advised to keep an eye on it.

You realize, of course, that the opposite approach, preferring U2
over native execution, is very easy to implement. Just keep your
normal Helpkey and add a catchall frame at the very end of U2 that
looks like this:

{{5*}}
{2}XC {2}

(where "{2}" represents the Ascii-2 smiley character and "XC " the
3-byte function produced by commanding PFUN XC). This way, if
(and only if) the command line doesn't match any framename earlier
in the U2 file, the catchall frame eXeCutes it as a native command.
For various reasons this doesn't work for me, but in principle it's
an elegant and viable choice.

--
Carl Distefano
cld@xxxxxxxx


Harry Binswanger
hb@xxxxxxxx