File: XTree:\Forum archive |Bottom_of_page

| View Thread | Return to Index | Read Prev Msg | Read Next Msg |

XTree Forum archive

Re: Shift-Letter Extension -- RETRY

Posted By: Walter Rassbach <>
Date: Wednesday, 9 September 1998, at 4:23 a.m.

In Response To: Re: Shift-Letter Extension (John Gruener)

Well, I looked at my previous response and it ain't real good/clear, so let me try again...

The reason for having an "initial state" is that one wants slightly different behaviour for the first character in a sequence of shift-letter/numeric/glyph characters than one wants for the others... I described it that way (i.e., in terms of "state") because that's how I think of it -- It must be the kind of programming I do and/or the years of pure math...

ANYTHING other than a shift-letter, a numeric, or a glyph returns one to the initial state -- It could be a cursor key, ALT, CTRL, "V"iew, "C"opy/"M"ove, "T"ag, "D"elete, or any of the numerous (Kim: and useful! ;-) functions provided by our favorite program... Most of the time one is in the "initial state"...

Hitting a shift-letter, numeric, or glyph when in the initial state does THREE things:
(1) It clears any previous navigation string (from the last time) and starts the NEW navigation string with the character pressed,
(2) It jumps/scrolls/skips to (i.e., it becomes the file selected by the highlight bar...) the NEXT file whose name starts with the character pressed, and
(3) It takes one out of the initial state

Now, if one hits something like "C"opy, "T"ag, does a cursor move, or whatever, one goes right back to the initial state.

However if, instead, the next input character is another shift-letter, numeric, or glyph, it does something slightly different (from the program's point of view, just because it is not in the initial state), which is to:
(1) Extend the existing string with character entered (e.g., a "navigation string" [i.e., the sequence of "nav.keys" entered] of "C" becomes "CL" or "CL" becomes "CLO", etc.).
(2) It jumps/scrolls/skips to a file whose name starts with the UPDATED "navigation string", starting with AND INCLUDING the file which was under the highlight/cursor bar. In other words, it differs here in that a shift-letter, numeric, or glyph pressed in the "initial state" ALWAYS moves down at least one file while here it may stay where it is (i.e., if the highlight bar moved to a file named "CLOSE_IT.H" when one typed an "initial" shift-C, typing a shift-L doesn't move the highlight bar).
(3) One remains "not in the initial state"

SEE below for the handling of TAB, colon, and double-quote...

Again, as above, if the next key pressed in not another shift-letter, digit, or glyph (or colon or double-quote), one goes right back to the initial state... (Note: a TAB/shft-TAB does put one back in the initial state!)

A "colon" is used to indicate that any "nav.key" which follows (immediately) is to be used to select in the extension part of the name rather than the leading or main name (or vice-versa -- it is a toggle like INSERT...). Hitting colon and then a NON-"nav.key" is pointless since one goes back to the "initial state" and the toggle [effect] is reset too. Hitting colon and then another "nav.key" from the initial state skips down to the NEXT file with an extension which starts with that "nav.key" (i.e., it ALWAYS moves down at least one file name...), while doing it after other (immediately preceding) "nav.keys" may not move (just as above...).

The last "navigation string" entered is remembered (probably only on a "per session" basis, not in the history file although I would not object), and may be used in a couple of ways, as follows:

A) A File/B/G/S window TAB (when not in F8-split mode) skips/jumps to the NEXT file with a name which satisfies the last "navigation string" (i.e., sequence of "nav.keys"). It always moves down the scroll list by at least one file, and it puts one back to the initial state EVEN IF the [immeadiately] preceding key was a "nav.key" or a sequence of them... In the directory/tree window, a TAB retains its old meaning, skipping down to the next directory at the current "level" (or switching screens when split).

B) A shift-TAB does essentially the same thing except that it skips/jumps to the PREVIOUS file (i.e., UP the list).

C) A double-quote is sort of like a TAB, but has some differences, as follows:
. . (1) It works in a directory/tree window
. . (2) If one is in the "initial state", the previous navigation string is NOT cleared. Instead, it is "recalled", the highlight/cursor bar moves down to the next file which satisfies the "existing" navigation string (it always moves at least one line down) and one is taken out of the "initial state" (i.e., immediately hitting another "nav.key" extends the string rather than having it start over from "empty").
. . (3) If one is NOT in the "initial state" (i.e., the immediately preceding key was a "nav.key" or double-quote), it goes to the NEXT file satisfying the navigation string and leaves one "not in initial state". In fact, this is just the same effect as in (2) above...

D) An F4 reduces the display just like a ctrl-F4, except to files satisfying the navigation string rather than to tagged files... It also takes one back to the initial state (actually, it probably should not, but then life gets fairly complex... In fact, it should probably "lock down" the navigation string as a "prefix" until the display selection is reset, and any new navigation key sequence starts from where the "locked down" string left off... Actually this would be trivial to program but hard to explain...).

John:: I hope this helps rather than adding to the confusion. I will post an example sequence separately (due to message size constraint...). -- Walter

Messages in This Thread

| View Thread | Return to Index | Read Prev Msg | Read Next Msg |

XTree Forum archive is maintained by Mathias Winkler with WebBBS 3.21.

 
---<>---
 
Xtree and XtreeGold are registered trademarks of Symantec Inc.
Other brands and products are trademarks of their respective holders.


FILE COMMANDS:  Directory_view Previous_file   Next_file cuRrent   /Help |Top_of_page