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

Spelling






(For Jim Eberle, who wrote about the scrolling of the misspelled word to
the top of the screen):
I checked out the operation of the FixSpell (FS) function call in
XyWrite/DOS ver. 4.017. It works like the Windows version (unfortunately)
by moving the misspelled word to the second line from the top and leaving
the spell-correcting dialog at the bottom of the screen. For many people,
apparently, this doesn't give enough context for fixing the misspelled
word. The FS function is internal to XyWrite, and its internal code
includes not only the unwanted scrolling but the dialog itself (in other
words, the dialog box is a part of the EDITOR.EXE code and cannot be
modified in the DLG file). I think you can cure the sideways scrolling if
you work in draft mode with auto-wrap turned on. The FS function
terminates XyWrite's ability to accept input before the dialog box is
displayed, so I'm out of luck for jury-rigging a work-around. Or at least
till Carl or Robert comes up with a clever work-around.

Another bothersome deficiency that III+ had no problem with is restoring
the cursor position after the spelling dialog is dismissed. You mis-type a
word and then type another word or two before the beep registers in your
brain. You type Ctrl+E to correct the word, and when you're done, the
cursor lands on the word following the word you just fixed. OK if you're
creating text anew -- just hit Ctrl+End to get to the bottom of the
document. Otherwise, it's a pain.

Here's a work-around to put into the keyboard file: on some otherwise
unused key (I used key 55, the asterisk on the number pad), put this
sequence:
Q8,XD,DF,DF,FS

On the same key, in the Ctrl table, put this sequence:
DB,XD

Now when you hear a spelling error beep, press the numpad [*] key. Q8 is
ignored, any highlight is cancelled, and two consecutive highlights are
entered (the pair of DF's); then FS is invoked to get the menu.

Here's a neat thing: if the first spelling alternative is the one you want
(and it usually is), just press [*] again. This time, the Q8 (accept the
spelling alternative) is recognized and the rest of the stuff in the key is
thrown away.

Now if you want to get your cursor back to where it was, press Ctrl+[*] (on
the numberpad). The DB takes the cursor to the beginning of the selected
text (which doesn't show on screen because there's nothing inside the
selection area). The XD releases the selection.

The DF.DF sequence is handy if you want to set a bookmark that stays in
place irrespective of whether you add or delete text above it. Just tap F3
twice to set the mark. When you want to get back to it, tap Ctrl+[*] (if
that's where you've put the DB,XD sequence in your keyboard file.

The functions DB (define begin) and DE (define end) aren't very well
documented if at all. I've found them so handy that I put them in my
keyboard file at Alt+Ctrl+left arrow and Alt+Ctrl+right arrow, respectively
(in the keys within the arrow array, not on the number pad). Because
there's an Alt key involved, I put NI before the function just in case:
NI,DB and NI,DE respectively. (Sometimes an Alt-key combo wants to get
interpreted by DOS or Windows independently of XyWrite; NI keeps it inside
XyWrite. I believe NI originally stood for "Not-IBM.")

Tim Baehr
tbaehr@xxxxxxxx