Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

TCL Command to Bring Up Status Bar (AREV Specific)

At 15 MAR 1998 12:38:08AM TimDress@aol.com wrote:

Does anyone know if there is a TCL command that would bring up the Status Bar and then one to make it disappear. I am trying to have the status bar appear when I perform a SSELECT to visualize the Record Selecting that is occuring. If possible, it would be used something like this,

PERFORM 'STATUS BAR ON'

PERFORM 'SSELECT INVOICES.PAID BY PAY.DATE'

PERFORM 'STATUS BAR OFF'

Normally, our program runs without the Status Bar to give more screen space.

Thanks,

Tim


At 15 MAR 1998 01:16AM Matt Sorrell wrote:

Tim,

If, as it looks like you are, you are executing these commands from inside an R/BASIC program, there is a global variable that controls whether or not the status bar is visible. The variable name is @STATUS.ON . It can assume two values, 0 (zero) or 1 (one). Obviously, these are boolean true and false. If set to zero, status bar is off. If set to one, then status bar is on. There are several of my programs in which I am doing a custom write to the status bar, and when I do a select, or call another program that does a select, I'll turn the status bar off, and then when the process is over, I'll turn it back on.

However, I believe this only applies to whether or not the status bar is update. If, at the application level, you have the status bar disabled, then it will not display at all. To my knowledge there is not a way around this, but someone else may know of one.

Matt Sorrell

M.G.A., Inc.


At 15 MAR 1998 06:11AM Andre w P McAuley wrote:

We covered this in an old FKB so it may not be as relevant as it used to be. Unfortunately I won't hit the office for a day or so and don't have FKB at home. Anyone out there with a copy has my permission to post the article.

Regards

amcauley@sprezzatura.com

Sprezzatura Ltd

World Leaders in all things RevSoft


At 16 MAR 1998 12:15AM Don Bakke wrote:

I'm not sure if this will answer the right questions, but I found a couple of articles that seemed to relate to this topic (one from Revelation and one from Sprezzatura). Here the are:

  Enabling And Disabling The Status Line In An R/basic Program     Page: 1
  Document: R57                                           Date:30 JUL 1990
  Author:   Revelation Technologies                                       
  Level:    Intermediate
  While running an R/BASIC program, you may want to access all areas of the
  screen, including the area occupied by the status line. If the status line
  is on, you will need to turn it off temporarily. This can be accomplished by
  following these steps:
  • Set the screen height to the desired level.
  • Store the current screen image.
  • Turn the status line off.
  • Clear the screen.
  • Do your processing.
  • Turn the status line back on.
  • Restore the screen image.
  • Restore the screen height.
  Figure 1 provides an example of these steps.
  In other cases you may wish to temporarily prevent the status line from
  being updated during part of your program. For example, you may not want the
  user to see all of the system information that displays on the status line
  when your program does a PERFORM "SELECT...." The system variable @STATUS.ON
  can be changed to prevent the updates to the status line. Figure 2 shows
  this technique.
  Figure 1
  DECLARE FUNCTION ESC.TO.ATTR
  DECLARE SUBROUTINE VIDEO.RW
  • Change the screen height.
  @CRTHIGH += 3
  • Save the screen image.
  VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1,'R', IMAGE)
  • Turn off updates to the status line.
  SAVE_STATUS=@STATUS.ON
  @STATUS.ON =0
  • Clear the screen. @AW contains the background color
  • for all windows.
  ATTR=ESC.TO.ATTR(@AW)
  BACKCHAR=@ENVIRON.SET ;* The backdrop character.
  VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1,'C', BACKCHAR:ATTR)
  • Processing goes here.
  • Restore updates to the status line.
  @STATUS.ON=SAVE_STATUS

Enabling And Disabling The Status Line In An R/basic Program Page: 2

  • Restore the screen image.
  VIDEO.RW(0, 0, @CRTWIDE - 1, @CRTMAXHIGH - 1, 'W', IMAGE)
  • Restore the screen height.
  @CRTHIGH -= 3
  • END OF PROGRAM
  STOP
  Figure 2
  @STATUS.ON=0
  PERFORM 'SELECT SAMPLE_CUSTOMER BY STATE (S'
  @STATUS.ON=1

Customising The Status Line Page: 1

  Document: V4I4A4                                        Date:01 AUG 1992
  Author:   Sprezzatura Ltd                                               
  Level:    Expert
  When designing applications with an AREV "look and feel" it can be desirable
  to create highlighted words on the bottom status line (as with the system
  help level 2 function keys). In addition, when indicating cursor key
  movement it makes sense to use the arrow characters to illustrate the keys
  to press rather than spelling out "Cursor Left", "Cursor Right" etc.
  Two minor points need to be made before the explanation proper begins.
  Firstly, Status Line images are now stored in SYS.TEXT_PARMS, with a key of
  Process*Status (or Process2*Status for help level 2 images). Secondly, there
  are now only two supported help levels, 0 and 2. Whilst it is possible to
  use a help level of 1 this can lead to problems.
  When adding new status line images it behoves us to cater for both levels of
  user, so two status line images should be created per process, one for level
  0 and one for level 2. Statup will automatically select the correct image
  when asked to load Process. This discussion will concentrate on level 2
  status images but it can be amended for level 0.
  The layout of the status line image is documented in various places (UTILITY
  subdirectory on pre release 2.0, Programmer's Reference on 2.1, System
  Subroutines book) but the field that is of interest when customising
  highlighted words, is field 2. This field (in a level 2 status line)
  contains four multivalues, three for the top three boxes of the status line
  and the fourth for the bottom line. Highlighted words can only be put into
  the fourth multivalue.
  Very Simple Program to Test Amended Status Lines
  So that the new status lines can be tested, a simple program such as the one
  following can be used. Simply compile, catalog and attach to a macro key
        Subroutine TestStat
         /*
            Note that with help level 2 this will display record SPREZZ2
  • /
         Call Statup(4,"SPREZZ",Save)
         Call Input.Char(x)
         Call Statup(5,"", Save)
        Return
  Adding Highlighted Words
  The key point here is the use of hyphens. In multivalue 4, everything up to
  the first hyphen will be highlighted, then after the first hyphen, every
  word before a hyphen will be highlighted. Thus if a record were created
  called SPREZZ2*STATUS with a layout as follows
  MENU
  Sprezz
  RevM  
  Field 3

Customising The Status Line Page: 2

  This is Highlighted-This Isn't-ThisIs-This Isn't
  1
  it would appear on the status line as follows
  ³Sprezz³RevM  ³Field 3                           ³
  ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´
  ³This is Highlighted-This Isn't-ThisIs-This Isn't³
  Note then that to give the illusion of multiple words being highlighted,
  mixed capitalisation must be used (I.E. ThisIs, rather than This Is, where
  only the Is would be highlighted). Note further that when the text in
  the record is shorter than the width of the status line cell, a number of
  spaces must be appended after the text to display to the width of the cell.
  With the final cell this can be made easier by appending a value mark.
  Adding Arrow Characters To the Status Line
  Unfortunately the ASCII characters for the various arrow symbols cannot be
  added directly into the status line as they cause the screen to become
  corrupted. To get around this, a fix has been provided. It would not be
  uncharitable to describe this fix as a kludge.
  Essentially, five characters have been provided that are taken by the system
  to mean that they should be replaced with arrow characters when they are
  bracketed by *'s and a flag variable is set. The characters and their
  meanings are as follows
       #         Þ (represents a double headed arrow)
       ~         ?
       |         
       ^         
       `         
  The flag variable is that somewhere in the preceding text, a ^ should have
  been entered. For convenience it is recommended that this be the first
  character on the line although this is not strictly necessary (see note 1).
  Thus the the status record
    MENU
    ^Sprezz
  Rev*^* M 
  • ~*-Move Left *³*-Move Right
    1
  would appear on the status line as follows
  ³Sprezz³RevM ³.......                           ³
  ÃÄÄÄÄÄÄÁÄÄÄÄÄÄÁÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´

Customising The Status Line Page: 3

  ³?-Move Left -Move Right                        ³
  Note 1:
  Thus the example given could also have achieved the same results if rendered
       Sprezz
  Re^v*^*M
  • ~*-Move Left *|*-Move Right
  (Volume 4, Issue 4, Pages 6-7)

View this thread on the forum...