home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / database / browsevt.zip / BROWSE.DOC next >
Text File  |  1987-04-19  |  6KB  |  147 lines

  1.       Last revision: April 19, 1987 at 7:44
  2.  
  3. Synopsis of the BROWSE command in the VANT object code library
  4.  
  5. The Clipper compatible BROWSE command in the VANT Library is called 
  6. simply as you would any user written procedure. Two optional parameters
  7. may be specified.  The syntax is:
  8.  
  9.         DO BROWSE WITH [fields_list,[edit_flag]]
  10.  
  11. The defaults of these parameters are, all fields and editing allowed.
  12.  
  13. IMPORTANT: A database file must be opened in the current work area when
  14. BROWSE is called.  The database may have an opened index(s) associated
  15. with it when BROWSE is called.  Also, if the currently selected file is
  16. indexed, BROWSE will know and enables a SEEK to the key command.  The
  17. menu is modified in its upper right hand corner if Seeking is enabled.
  18.  
  19. Fields_list is an array of field names of currently opened DBF files
  20. and the ALIAS->FieldName notation should used for non-selected files. 
  21.  
  22. Some users may not wish to allow editing and deletions from the BROWSE
  23. command and for this reason, the edit_flag is provided.  If specified
  24. as .F. then the BROWSE command is modified so as to not allow any
  25. editing, appending, and/or deletions and the menu is accordingly also
  26. modified as if those BROWSE command didn't exist.  Pressing the F1 or
  27. H keys when editing has no effect if the edit_flag is .F.
  28.  
  29. Both these parameters are optional, however if both are specified, the
  30. fields_list MUST proceed the edit_flag.
  31.  
  32. When editing, a remember last arrow direction feature is enabled which
  33. will move the cursor in the same direction used to arrive at the
  34. field being edited.  Unfortunately, this feature will not work in the
  35. moving left direction.  It is handy to have the cursor keep moving in
  36. the same direction after each edit.  
  37.  
  38. If editing a key field in an indexed database, the record will be
  39. repositioned after the edit, if the changes causes the active index to
  40. be modified.  Press 'S' to determine what is the key field(s) of an
  41. indexed database.
  42.  
  43. The BROWSE command makes no environmental changes.  The ScoreBoard may
  44. be either On/Off. The non-networked BROWSE uses the left side of the 
  45. first line for information, network messages are displayed on right.
  46.  
  47. Please note that BROWSE saves the screen when called and then restores
  48. the screen when control is returned to the caller.  The Clipper 
  49. SAVE/RESTORE SCREEN command may be in use when BROWSE is called since
  50. the BROWSE screen save uses its own internal screen storage buffer.
  51.  
  52. The file will be positioned with the current record as the first on the
  53. BROWSE screen.  If the record position is moved while in BROWSE, the
  54. database will be repositioned when control is returned to the caller.
  55. It is suggest that the caller take the possible reposition of the
  56. database into account when using the BROWSE command.
  57.  
  58. If the database file is positioned to its logical EOF by using the down
  59. arrow, and editing is allowed, the message "Add a blank record?"
  60. appears at the bottom of the screen.  If when adding records by this
  61. method, and an index is in use, it is suggested that the first field
  62. added to the blank record be the key field.  Otherwise the new blank
  63. record will appear to be at the beginning of the file after the first
  64. field is added.
  65.  
  66. If the key field is the selected field column when a new blank record is 
  67. added to an indexed database, and the proper key information is added to
  68. the key field, the newly added record will be positioned in its proper
  69. logical order which may assist in filling in the rest of that record's
  70. data.
  71.  
  72. First, an example of using BROWSE to show all fields with editing.
  73.  
  74.       DO BROWSE
  75.  
  76. Gee, now that wasn't so hard!
  77.  
  78. Here is an example of using BROWSE to only show three specific fields
  79. in a data base that is open and currently selected.  The three fields
  80. are called, LastName, Company, and City.  Also, since we don't wish to
  81. allow editing, deleting or appending, a false edit_flag is specified.
  82.  
  83.       DECLARE fields[3] 
  84.       fields[1] = "LASTNAME"
  85.       fields[2] = "COMPANY"
  86.       fields[3] = "CITY"
  87.       DO Browse WITH fields, .F.
  88.  
  89. Say you also wanted to show a fourth field in some other open, related
  90. database, linked to the currently selected database via a "SET RELATION
  91. TO linkfield INTO otherfil", you would just add it to the fields_list
  92. as follows, being sure to specify its alias:
  93.  
  94.       DECLARE fields[4] 
  95.       :
  96.       fields[4] = "OTHERFIL->FIELDNAME"
  97.  
  98. If the editing flag is true, you may edit the field(s) in that other
  99. open but not selected database.  Appeding and record deleting is only
  100. done in the currently selected database.
  101.  
  102. This version of BROWSE ver3.0 uses the DBEDIT() function in the
  103. Clipper Autumn '86 release two.  It MUST be linked with the DBU.LIB
  104. which comes with Clipper A86.
  105.  
  106. Read Clipper's documentation regarding DBEDIT() for more info. PLEASE
  107. note that memo fields are not allowed and no check is made for valid
  108. field names when DBEDIT() is called.  If a character field is longer
  109. that 78, the field will be truncated but edited in a sliding window.
  110.  
  111. A alternative networking version of this BROWSE is available which
  112. implements full record locking.  It is used in exactly the same manner
  113. as is the standard BROWSE in the VANT.LIB library except there is
  114. recording locking before deleting/recall a record, deleteing a field,
  115. editing a field, or appending a new record. The standard Clipper file
  116. locking functions are called to lock the records.  If the locking fails
  117. a "WAIT" message is displayed and after about 5 seconds, a warning
  118. messsage is displayed on right side of top line and the bell is sounded
  119. to inform the operator to press a key to continue. It is assumed that
  120. the file to browse has been opened in either shared or exclusive mode.
  121.  
  122. The networking version of BROWSE may be used in non-networked programs.
  123. No changes are necessary, just use it in exactly the same manner for
  124. either type application.
  125.  
  126. NOTE: There is a bug in Clipper Autumn '86 DBEDIT() function that
  127. sometimes cause the screen to become totally confused and write
  128. stuff all over the place.  The problem will not appear with all files
  129. but seems to be a function of the number and/or length of fields.
  130. It usually shows up when you use ^END to move to the right edge and
  131. then use ^<-- to pan back across. Sorry but I can't fix that...
  132.  
  133.  
  134. H.M. Van Tassell
  135. 123 Hill Hollow Road
  136. Watchung, NJ 07060
  137. (201)755-5372
  138.  
  139. [eof]
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.