tips:revmedia:v3i4a3

REVMEDIA Revisited

Published ByDateVersionKnowledge LevelKeywords
Sprezzatura Ltd01 AUG 19912.1+EXPERT$RTP1, REVBTMSG, WINDOW_COMMON%, GAS.BAR, STATUP, @STATLIST, SUM, RTP38, RTP42, RTP18, RTP18.ENGLISH, V5, V6, V7, SELECT, BTREE.EXTRACT, OSOPEN, SETPTR, INIT.VIEW, VIEWER, SECUREUSER

To ensure that your documentation is as up to date as possible we introduce an occasional series intended to bring previous REVMEDIA articles into line with release 2.1 of AREV. Note that we will normally emphasise information that has become outdated - new features will be left to later issues unless they directly impact on RTPSeries, VERBatim and @ATTACK. My thanks to all subscribers who have helped by notifying me of bugs or discrepancies. Thanks also to RevTech for fleshing out some of the previously "unsure" RTPs. Special thanks to Dave Mills of the Nature Conservancy Council.

Page 8Reference is made to modifying $RTP1 to change the "Processing" message at logon. This is no longer necessary as all logon messages are stored in the DOS file REVBTMSG on REVBOOT and can be modified there.
Page 9Codes S/L - the two codes are slightly different, not identical as stated. The L code is not able to access window registers.
Page 10Alt-M no longer corrupts an active select list and the "locate by" anomaly has been fixed.
Page 2FILE.LOC has been removed
Page 3The bug has been fixed.
Page 3The system has been modified so that if any of the prompts to be redisplayed or removed are multi-valued and/or required then all other necessary WINDOW_COMMON% variables are kept in step.
Page 10If the help level is anything other 0, screen corruption can occur whilst using GAS.BAR. Neil White of the Inland Revenue and Al Blake point out that the location parameter in the STATUP call cannot be a null value if the help level is not 0 (See 2.1 Addendum p8.69). It must contain a template name from @STATLIST. The template will not be affected by this operation. He suggests changing line 22 by inserting the following
            if @HELP.LEVEL # 0 then
               DUMMY = "LIST"
            end else
               DUMMY = ""
            end
            statup(PUSH$, DUMMY, SAVE.STATUS)

Note further that if @REC.COUNT = 1, the bar will not clear down properly. This then effects subsequent calls. To avoid this problem test for @REC.COUNT > 1 rather than IF @REC.COUNT on line 17. See also the corrections in the editorial of Volume 1 Issue 3 for this code listing.

Page 4Note that the "File" where the index is located is a dictionary file.
Page 5The SUM processor now expects all values to be numeric OR null. It will break with a non- numeric message if alpha characters are summed.
Page 7RTP38 performs Filing System flushes, not complete frame flushes.
Page 7RTP42 is used to maintain system labelled common information.
Page 10This article has been superseded by the new index hook functionality.
Page 5Whilst V5 is the SELECT processor there is no Verb record to support it. This tends to suggest that the functionality has been built into a lower level of RTP18 and RTP18.ENGLISH.
Page 6V6 now supports A B F and K.
Page 6V7 has been removed.
Page 3Message display when using BTREE.EXTRACT can now be suppressed by using the optional flags provided. Parameters five and six in a BTREE.EXTRACT call are used to indicate options and error flags respectively. Passing an "E" in options will suppress all error messages, whilst passing an "S" will display all informational messages. (See 2.1 Addendum p 8.9 but bear in mind that it IS possible to suppress both kinds of message by passing SE or ES).
Page 4OSOPEN - the line "If the status is 2, the directory exists, if 2 a file exists with that name" should read "If the status is 2, the directory exists, if 4, the directory does not exist and if 0, a file exists with that name."
Page 4SETPTR - An additional error codes of 4 exists, meaning Not Enough File Handles. As a side point, users of products such as HIJAAK may get this message when trying to capture screens from within AREV due to the amount of files AREV holds open. To get round this, issue a FLUSH or PC at TCL - this will free up file handles.
Page 6INIT.VIEW has been amended to work better within called subroutines. However usage can be a little disconcerting unless properly understood. There are two ways to utilise report programs using INIT.VIEW, by calling subroutines that use it and by EXECUTE "RUN" programs / subroutines that use it. The latter is normally to be preferred. Unfortunately VIEWER behaves in an unusual manner which does not lend itself to a lucid explanation. The pseudo code following attempts to explain it.
           loop
           until <Esc> pressed
             begin case
              case key = PgDn
               if LAST_PAGE and FIRST_TIME
                run rest of subroutine then
                  if called as subroutine then
                   return to calling subroutine
                   complete calling subroutine
                   return to page logic
                  else
                   if RUN by EXECUTE/PERFORM then
                    stay in page logic until <Esc>
                   end
                  end
                end
               else
                if not(LAST_PAGE)
                  show next page
                end
               end
              case key = PgUp
               if not(FIRST_PAGE) then
                show previous page
               end
             end case
           repeat

To clarify the above, try running the following sections of code and pressing PgDn at the bottom of the report

EXAMPLE 1

perform "RUN BP TEST"
* NB This only displays after <Esc>
call msg("And back","","","")


EXAMPLE 2

call TEST
* NB this displays after 1st PgDn at bottom
call msg("And back","","","")


           subroutine test
            call INIT.VIEW(40)
            @VIEW.MODE = 1
            heading "TEST REPORT"
            for X = 1 TO 150
             print "TESTING INIT VIEW " : X
            next
            call msg("Bottom of Report 1!","T2","","")
            for X = 1 to 150
             print "and more! " : X
            next
            call msg("Bottom of Report 2!","T2","","")
           return

Note further that VIEWER now uses the video attributes set up in @AW so that the colour may be controlled by manipulating the following @AW fields :-\\
< 1 > - VIEW window border and title
< 2 > - HEADING/FOOTING and COLHEADING
< 3 > - Background to use in absence of any other (indicated by a CHAR(127) in the background byte position).
< 8 > - Main text colour
< 9 > - Border type

Page 10SECUREUSER - see editorial of issue 8 for correction to object code modification.

(Volume 3, Issue 4, Pages 6-9)

  • tips/revmedia/v3i4a3.txt
  • Last modified: 2024/06/19 20:20
  • by 127.0.0.1