home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / clarion / brokcode.zip / KW33CORR.EXE / KW33CORR.TXT < prev   
Text File  |  1991-07-16  |  1KB  |  48 lines

  1.  
  2.              Correction to CTJ #3-3 Designer Forum Article
  3.             -----------------------------------------------
  4.  
  5. The Designer Forum article code by Kenneth Weiss in the May/June issue
  6. (#3-3, page 21) contains an assumption that the number of records will
  7. always be equal to or larger than the scroll rows available.  The
  8. reliance on the COUNT variable to tell us the maximum value of NDX in
  9. the scrolling area is this bad assumption.  Accordingly, the [Down_Key],
  10. [End_Key], [Tab_Key/Right_Key] and the [Shft_Tab]/[Left_Key] will not
  11. work properly when the number of records is less than the number of
  12. rows in the scroll area (ie, the COUNT variable).
  13.  
  14. Below is the corrected code.  Instead of the COUNT variable, this code
  15. uses the value returned by RECORDS(TABLE) to tell us the maximum
  16. number of rows actually being used.  A corrected copy of DYNAMIC.MDL
  17. is included on this month's code disk.
  18.  
  19.  
  20.       OF DOWN_KEY
  21.         IF NDX = RECORDS(TABLE)
  22.           DO SET_NEXT
  23.           DO FILL_NEXT
  24.           IF FOUND
  25.             SCROLL(ROW,COL,ROWS,COLS,ROWS(?POINT))
  26.             GET(TABLE,RECORDS(TABLE))
  27.             DO FILL_SCREEN
  28.           .
  29.         ELSE
  30.           NDX  += 1
  31.         .
  32.  
  33.      OF END_KEY
  34.        NDX = RECORDS(TABLE)
  35.  
  36.      OF TAB_KEY
  37.      OROF RIGHT_KEY
  38.        IF NDX < RECORDS(TABLE) THEN NDX += 1.
  39.  
  40.      OF SHFT_TAB
  41.      OROF LEFT_KEY
  42.        IF NDX = 1
  43.          NDX = RECORDS(TABLE)
  44.        ELSE
  45.          NDX -= 1
  46.        .
  47.       .
  48.