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

Re: New Enter routine



Carl,
Using separate keys for the spell-checker and inputting to the XPL may be the way I have to go. Too bad, because the whole idea here was not to have to remember to hit different keys for what is or could be the same functionality.
In any event, I will certainly keep some special keys to put out plain
vanilla  and PrsKbdArg.
You'd think that VA$GM128 and VA$GM8192 would be available for testing, but
I haven't gotten either of them to work.
Yes, I discovered XMACRO, and its kbd programming function, and am working
successfully with it now. But it is to no avail if VA$GM128 is always zero.
I can see that the speller is sitting on a highlighted item precisely while
the Prompt line is giving me the $GM128 value as zero.

Try the below with a spell-checkable file open:

XPLeNCODE v2.0
b-gin [UNTITLED]
[TF_][BX_]spell[Q2_][BX_]p[Q2_];*;[cr|lf]{<}LBA{>};*; LOOP [c
r|lf]{<}SX11,{<}VA$GM128{>}{>}{<}PR$GM = @11{>}{<}SX01,{<}RC{
{062}}{>}[BC_]ready:;*;[cr|lf]{<}IF{<}IS01{>}=="x"{>}[BC_]{<}EX{>
}{<}EI{>};*;[cr|lf];*;[cr|lf]{<}IF{<}IS01{>}=="y"{>}[255+048+
068]{<}EI{>};*;[cr|lf]{<}GLA{>}
-nd
XPLeNCODE
Hmm, I see from the encoded version that if you hit "y" it responds with a three-byte version of the carriage return. Onscreen I see the musical note, which is what I thought it should be. Putting in instead a regular (showing up in text as an arrow) doesn't fix it either. But the main thing is that I can't test for VA$GM128 being non-zero, because it doesn't ever seem to be.

Regards,
Harry
Harry:

> The new ENTER routine works beautifully and is a real pleasure.

I see from your later message that you mean the old routine. Try the
new one (posted today). The functionality is the same, and so is
most of the code; just a few slight tweaks and economies.

> I can't yet get it to work when I hit the ENTER key while a
> program is running and wants input.

Read the caveats in my post earlier today. It's essential to
maintain a plain-vanilla Enter key somewhere on your keyboard. XPL
programs that expect a 2-byte CrLf when the Enter key is pressed
will bomb if the Enter key puts out something else.

> Something is wrong with my using keys to do XPL.
>
> Can you see the error in this:
>
> 88=no,«,I,F,«,V,A,$,G,M,8,1,9,2,»,>,0,»,x,«,E,I,»,«,E,X,»,

Works as expected here -- if I substitute 1-byte guillemets for "«"
and "»": Puts the code at the cursor position. You might want to
change that initial func to GT, to force the cursor into text before
the string is put.

> I'm using one-byte guillemets. Maybe that's the problem. Will
> try to get three-byters in there.

Same difference. Three-byte guillemets are translated into 1-byters.
Puts the string at the cursor position. As expected.

Surely, by "do XPL", you don't mean *execute* the code. KBD-file
programming? No can do in Xy4, unless you use U2's XMACRO facility.

--
Carl Distefano
cld@xxxxxxxx


Harry Binswanger
hb@xxxxxxxx