home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / kbrows.zip / KEVBROWS.DOC < prev    next >
Text File  |  1993-05-30  |  4KB  |  93 lines

  1. KBROWSE - A Fast Database Browser                      May 27, 1993
  2. -------------------------------------------------------------------
  3. Kevin E. Saffer - (904) 262-1020 EST if you have questions.
  4.  
  5. Syntax:
  6.   
  7.   KEVBROWSE([<nTop>],[<nLeft>],[<nBottom>],[<nRight>],[<aColumnInfo>],;
  8.             [<bRetExp>],[<cHeadSep>],[<cColSep>],[@<aMarked>],[<nFrozen>])
  9.                                    
  10. Parameters, all optional:
  11.  
  12.   <nTop>        = top left row coordinate; default = 0
  13.   <nLeft>       = top left column coordinate; default = 0
  14.   <nBottom>     = bottom right row coordinate; default = 24
  15.   <nRight>      = bottom right column coordinate; default = 79
  16.   <AColumnInfo> = multi-dimensional array of column info, detailed below
  17.   <bRetExp>     = code block to be evaluated if Enter is pressed, 
  18.                   default = {|| RECNO()}
  19.   <cHeadSep>    = string of header separators, default = "═╤═"
  20.   <cColSep>     = string of column separaters, default = " │ "
  21.   @<aMarked>    = array to hold marked record numbers, default = ""
  22.   <nFrozen>     = number of columns to freeze, default = 0
  23.     
  24. Column information array layout:
  25.  
  26.   This array contains one element for each column to be displayed.  Each
  27.   element contains an array containing the following elements:
  28.  
  29.      1 - The column title string.
  30.      2 - a code block to return the value for the column.
  31.      3 - the index order to activate when moving into the column.
  32.      4 - a picture clause to apply to the incremental search string.
  33.      5 - the starting index key value for key-limited browsing.
  34.      6 - the ending index key value for key-limited browsing.
  35.  
  36.    Elements 1 and 2 must be supplied, the remaining elements are optional.
  37.  
  38.    If the array is not passed, KBROWSE() will attempt to display the 
  39.    fields and names from the currently open database file.
  40.  
  41. Notes:  
  42.  
  43.   Parameters are checked for absence only;  specifying an incorrect or
  44.   unreasonable parameter will cause erratic results.  For example,
  45.   browsing a file with a wide data field in a very small window will
  46.   cause the data to be displayed outside of the window.  In addition,
  47.   specifying a higher number of frozen columns than will fit in the 
  48.   window will also cause data to overwrite the window.  When time 
  49.   permits, complete error checking will be added.
  50.  
  51. History:
  52.  
  53. I have spent the last several months converting an existing Summer
  54. '87 application over to 5.2, rebuilding it from the ground up. 
  55. During this conversion, all DBEDIT() function calls were re-written
  56. for Tbrowse to take advantage of the increased functionality.  I
  57. distinctly remember the first time I saw a moderately useful
  58. Tbrowse execute on my development system; I was dismayed at the
  59. drop in response time and general operating speed.  This problem
  60. worsened radically when the system was installed onto a Novell LAN
  61. running under Windows.  Simply dropping conventional memory to
  62. 500K caused the browse function to sometimes take 10 seconds to
  63. appear, and incremental searching delays were 10 to 15 seconds per
  64. keystroke.  Something had to be done!
  65.  
  66. I investigated every library and function available to me, even
  67. purchasing some of the so-called object libraries.  All these
  68. systems were simply add-on code with a Tbrowse object at the root,
  69. therefore the performance problems remained.  One company would'nt
  70. even make some simple mods to the code to allow mouse control to be
  71. added; I had to dismiss this route and write a browser myself.
  72.  
  73. Five bleary eyed days later, I had a browsing system that would
  74. perform at an acceptable speed even while running under Windows in
  75. contstrained memory.  The browser performes well, but does not
  76. quite achieve the snappy performance of the Summer '87 DBEDIT(). 
  77. I suppose it would have to be re-writtem in C to perform that fast.
  78.  
  79. This function was not written to replace Tbrowse, rather to supplement
  80. it.  In those cases where the operator must be able to rapidly locate
  81. a record in a very large indexed data file, KBROWSE() performs well.
  82.  
  83. Although the function will only operate on database files, I
  84. believe the performace gains will make this limitation acceptable.
  85.  
  86. I've included the source code so that you will be able to alter the
  87. function's operation in any way required.  Just be sure to carefully 
  88. examine the function's internals before making changes.
  89.  
  90. Hope it helps!
  91.  
  92. If you have any suggestions, E-Mail to 71431,3402
  93.