|
Post by Stefan on Nov 9, 2022 8:27:51 GMT -5
George,
I know that the UP and DOWN commands deliberately do not create a track entry. Those commands are used for just paging up and down and users can easily 'page back' to return to the point of origin. This works fine, because in general, the user knows 'how far' they jumped forwards or backwards and can easily return to whence they came.
I'd like to suggest that the specific forms of UP MAX and DOWN MAX be made exceptions to this rule. Reason being that you can be anywhere in a file and are navigating to a specific place which is an unknown distance away from 'here' (ie. similar to using a FIND or LOCATE command). Having completed whatever business I had at the new location, I often need to return to whence I came but (Track) cannot help. And I cannot 'page' back to where I was, because I don't know "how far away" it is.
You'd think that I could just 're-program' the UP MAX and DOWN MAX keys to use LOCATE instead, EXCEPT that these two function are in fact unique. UP MAX positions the display with the *** Top of Data *** line at the top. DOWN MAX positions the display with the *** Botton of Data *** line at the bottom.
While LOCATE .ZF TOP gets a "close but no cigar" verdict, any sequence involving LOCATE .ZL is at best unreliable, if not useless. You can use LOCATE .ZL(Enter)UP PAGE(Enter)DOWN 2(Enter) but it is still not correct every time, especially if you were near the bottom of the file already.
Hence I reckon a built-in solution would make life easier for everyone, not just me.
|
|
|
Post by George on Nov 9, 2022 10:00:01 GMT -5
Stefan: Very awkward, as the TRACK YES/NO decision is made during command assignment based on an entry in the command table.
If UP/DOWN were permitted in the table, there's no easy way to add code to UP/DOWN themselves to conditionally UNDO the TrackStart data which has already been created before the command is given control. Tracking data is tricky.
It would take unique code in the command dispatcher to watch specially for UP/DOWN, parse the operand out to look for MAX and then decide YES/NO as to tracking. A very ugly proposition.
George
|
|
|
Post by Stefan on Nov 10, 2022 12:42:50 GMT -5
OK, George, no problem. Time to get sneaky and SPFLITE is versatile to say the least. (1) Add SET statement: TRACK.UPDWNMX=Y
(2) Create a mini-macro called UpDwnMx.MACRO
' UPDWNMX.MACRO '----------------------------------------------------------------------------------------- ' This is Edit Macro UPDWNMX Stef 10/11/22 ' ' This performs the 'UP MAX' or 'DOWN MAX' command but first sets a (TRACK) point to ' allow the user to return to the previous point in the file. ' ' Requires the following: ' SET statement: TRACK.UPDWNMX = Y ' Up-key mapped to: !UPDWNMX UP(Enter)(CondLineNo) ' Down-key mapped to: !UPDWNMX DOWN(Enter)(CondLineNo) '----------------------------------------------------------------------------------------- SPF_Post_Do("!"+Get_Arg$(1)+" MAX")
(3) Change the KEYMAP for the keys that do the normal UP MAX or DOWN MAX to !UPDWNMX UP(Enter)(CondLineNo) and
!UPDWNMX DOWN(Enter)(CondLineNo) respectively.
I just love the way you have made SPFLite!
|
|
|
Post by George on Nov 10, 2022 14:58:10 GMT -5
Stefan: A lot of that flexibility is just luck. And thank thinBasic as well.
We started out attempting to put in a standard REXX / ISREDIT interface, but a) I could simply not get the REXX interface to work properly, and b) ISREDIT interface would have taken an amazing effort since it had to replicate the ISREDIT to ISPF interface. Basically users would have expected their old mainframe REXX macros to work perfectly with absolutely minimal changes. And that was never going to happen, even if we got 'something' working.
I explored further, and came across thinBasic, and it turned out to be amazingly simple to create the interface. And since thinBasic was written in PowerBasic, there were almost no interface problems nor a re-learning curve to get back REXX experience. And Eros Olmi (thinBasic developer) was exceedingly helpful several times in figuring out the "how to's" of complex stuff.
And personally, I wouldn't ever want to go back to a REXX/ISREDIT macro interface, looking back I find it incredibly clunky.
George
|
|