home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MENUSPCS.ZIP / MENUS.REF < prev    next >
Encoding:
Text File  |  1987-12-27  |  26.3 KB  |  684 lines

  1.      Copyright (c) 1987 by Morton Goldberg, All Rights Reserved
  2.  
  3.                         Menus for Scheme (tm)
  4.                     Programmer's Reference Manual
  5.  
  6.                                  by
  7.  
  8.                            Morton Goldberg
  9.                            3268 Alpine Dr.
  10.                         Ann Arbor, MI  48108
  11.  
  12.                            (313) 973-2571
  13.                         CompuServe: 72346,565
  14.  
  15. This is the programmer's reference manual for the shareware product
  16. Menus for Scheme, an object-oriented implementation of menus.  It
  17. uses the SCOOPS (Scheme Object Oriented Programming System) language
  18. extension supplied with your copy of PC Scheme.  The file SCOOPS.FSL
  19. must be loaded into the Scheme workspace before MENUS.FSL if Menus
  20. for Scheme is to function.
  21.  
  22. The author's intent is to convey all the information that a
  23. programmer will need to incorporate menus into an application
  24. successfully.  The manual describes the procedures you will use to
  25. construct instances of menus and other objects provided by Menus for
  26. Scheme and the messages that your applications may send to control
  27. the their behavior.  A glossary of the special terminology of object
  28. oriented programming as it applies to SCOOPS is included.  You will
  29. also find it helpful to be familiar with the chapter on SCOOPS in the
  30. TI Scheme Language Reference Manual.
  31.  
  32.  
  33. THE FACILITIES PROVIDED BY MENUS FOR SCHEME
  34.  
  35. A menu is a window that pops-up on the screen and presents the user
  36. with two or more choices, called menu items.  When one of the menu
  37. items is selected, it determines the next action taken by the
  38. program.  The user may decide to cancel the menu without selecting
  39. any of the menu items.
  40.  
  41. Menus for Scheme provides application programs with two classes of
  42. menus, horizontal menus and vertical menus.  The two classes differ
  43. only in their appearance on the screen.  Horizontal menus present all
  44. their menu items on one line of the screen.  Vertical menus present
  45. each of their menu items on a separate line of the screen.
  46.  
  47. Menu Item Selection by Means of the Bar-Cursor
  48.  
  49. A bar-cursor can be moved to cover a menu item.  The bar is moved by
  50. the arrow keys,  but a selection is not made until the enter key is
  51. pressed.
  52.  
  53. Menu Item Selection by Means of a Selector Key
  54.  
  55. Selection can also be made by pressing a selector key, which can be
  56. any key on the keyboard that generates a single ASCII character.  The
  57. selector is usually the first capitalized letter of the text
  58. describing a menu item on the screen, but Menus for Scheme allows
  59. arbitrary association between a selector and a menu item.  It even
  60. allows for multiple selector keys to be associated with a single menu
  61. item.
  62.  
  63. Item Selection Abort Forced by the Esc-Key
  64.  
  65. Pressing the Esc-key will always force a return from menu processing
  66. without making a selection.
  67.  
  68. Secondary Popup Windows
  69.  
  70. When selecting a menu item results in an action that generates a user
  71. message requiring no response from the user, a popup text window is
  72. used to display the message.  The text window is erased when the user
  73. presses the Esc-key.
  74.  
  75. When selecting a menu item results in an action requiring additional
  76. input from the user, this may be solicited by means of a subsidiary
  77. menu or by a popup query window, which is a popup window containing a
  78. query message and an input field for receiving the user's response.
  79. The input field is a string of spaces which may be displayed with
  80. text attributes that differ from the text attributes of the rest of
  81. the query window.  A cursor appears within the input field, signaling
  82. its readiness to receive input.  Destructive backspace is supported
  83. so the user can perform simple editing.  A query window is erased
  84. when the user's response satisfies the query, or when the user
  85. presses the Esc-key.
  86.  
  87.  
  88. NOTATION
  89.  
  90. Symbols enclosed in angle brackets denote syntactic variables and
  91. indicate the type of the actual expressions that they stand for.  For
  92. example,
  93.  
  94.      (foo <integer>)
  95.  
  96. means
  97.  
  98.      (foo (+ 2 2))
  99.  
  100. is a valid expression.  Further, ellipses are used to indicate when
  101. one or more expressions of the same type may appear.  Thus,
  102.  
  103.      #(string1 string2 ... )
  104.  
  105. means a vector of one or more expressions, each evaluating to a
  106. string.
  107.  
  108.  
  109. WINDOW PROPERTIES
  110.  
  111. The TI Scheme screen coordinate system is a zero-based, (row, column)
  112. system with its origin (0, 0) at the top, left corner of the screen.
  113. The position of a window is the position of its top, left-most text
  114. character; borders are not considered by the positioning logic.
  115. Placing a bordered window at (0, 0) will cause the both the top and
  116. the left-hand side of the border to be clipped.  Consequently, to put
  117. a window at the top, left corner of the screen, place it at (0, 0) if
  118. it doesn't have a border, and place it at (1, 1) if it does.
  119.  
  120. A window created by Menus for Scheme is a popup text window.  This
  121. means that it uses the same zero-based coordinate system as the
  122. screen, but local to the window itself and that the origin of window
  123. lies inside the border if there is one.  It also means that any test
  124. underlying a window is saved before the window is displayed and
  125. restored when the window is erased.
  126.  
  127. A window in Menus for Scheme is automatically sized to fit its
  128. contents.  The application never has to tell Menus for Scheme how big
  129. to make a menu or a secondary popup window.  On the other hand, if an
  130. application needs to know the size of a window, it can get that
  131. information from Menus for Scheme.
  132.  
  133.  
  134. CONSTRUCTORS
  135.  
  136. Classes in Menus for Scheme are abstractions and can not be used
  137. directly by applications.  An application must first construct
  138. instances of any class it wants to use.  To make constructing
  139. instances relatively easy, Menus for Scheme provides a constructor
  140. for each of the classes described in this manual.  Constructors have
  141. been named by adhering to the convention of prefixing the class name
  142. with "make-" (e.g., the constructor for instances of class horizontal
  143. menu is the procedure make-horizontal-menu).
  144.  
  145.  
  146. MAKE-POPUP-TEXT-WINDOW
  147.  
  148. To create a popup text window, an application program evaluates an
  149. expression of the form:
  150.  
  151.      (make-popup-text-window <init-list> <text>)
  152.  
  153. where <init-list> is a list of quoted symbols alternating with
  154. initial values:
  155.  
  156.      ('w-top <integer>
  157.       'w-left <integer>
  158.       'n-attr <integer>
  159.       'border? <boolean>)
  160.  
  161. The entries in <init-list> are:
  162.  
  163. 'w-top <integer>
  164.  
  165.                 The row position of the window on the screen.
  166.  
  167. 'w-left <integer>
  168.  
  169.                 The column position of the window on the screen.
  170.  
  171. 'n-attr <integer>
  172.  
  173.                 The window text attributes; see WINDOW-SET-ATTRIBUTE
  174.                 in the TI Scheme Language Reference Manual for
  175.                 further information.
  176.  
  177. 'border? <boolean>
  178.  
  179.                 If <boolean> evaluates to #t the window will have a
  180.                 border; if it evaluates to #f, it won't.
  181.  
  182. The <text> argument is a vector of strings
  183.  
  184.      #(<string1> <string2> ... )
  185.  
  186. which form the contents of the window; each element of the vector
  187. will appear as a separate line of text when the window pops onto the
  188. screen.
  189.  
  190. The <init-list> argument can viewed as a table with one line per
  191. instance variable and two entries per line, the variable name (a
  192. quoted symbol) and the value to be assigned to the variable.  The
  193. quoting of the variable name must not be overlooked.
  194.  
  195.  
  196. POPUP TEXT WINDOW EXAMPLES
  197.  
  198. The Scheme source code file MENEX.S, included with Menus for Scheme,
  199. contains two examples of popup text windows.  The first of these is
  200. the "quick brown fox" window.  It uses the global variable *fox-data*
  201. to hold its <init-list> and the global variable *fox-text* to hold
  202. its <text> vector.  In this case, the text is static; it does not
  203. change each time the window pops onto the screen.
  204.  
  205. Note how the value of the text attributes paired with n-attr is
  206. fetched from the *text-colors* environment.  A simple integer could
  207. have been used, but fetching the value form *text-colors* is less
  208. error-prone.
  209.  
  210. The other example of a popup text window is the window that pops onto
  211. screen when the "report Free space" menu item is selected from either
  212. the horizontal menu example or the vertical menu example.  In this
  213. case, the text is dynamic because free space must be determined anew
  214. each time the user selects "report Free space".  Consequently, the
  215. freesp-rpt popup text window is created with a dummy text argument
  216. consisting of only one space.  The actual text is generated by the
  217. do-freesp procedure and passed to the freesp-rpt window as the text
  218. argument of a set-text message.
  219.  
  220.  
  221. MAKE-POPUP-QUERY-WINDOW
  222.  
  223. To create a popup query window, an application program evaluates an
  224. expression of the form:
  225.  
  226.      (make-popup-query-window <init-list> <text>)
  227.  
  228. where <init-list> is a list of quoted symbols alternating with
  229. initial values:
  230.  
  231.      ('w-top <integer>
  232.       'w-left <integer>
  233.       'cursor-row <integer>
  234.       'cursor-col <integer>
  235.       'input-width <integer>
  236.       'n-attr <integer>
  237.       'hl-attr <integer>
  238.       'border? <boolean>)
  239.  
  240. The entries in <init-list> are:
  241.  
  242. 'w-top <integer>
  243.  
  244.                 The row position of the window on the screen.
  245.  
  246. 'w-left <integer>
  247.  
  248.                 The column position of the window on the screen.
  249.  
  250. 'cursor-row <integer>
  251.  
  252.                 The row of the popup query window in which the input
  253.                 field will appear and on which the cursor will be
  254.                 placed when the query window pops onto the screen.
  255.                 Note: the input field is appended to the string which
  256.                 the <text> argument  assigns to the cursor-row.
  257.  
  258. 'cursor-col <integer>
  259.  
  260.                 The column of the popup query window at which the
  261.                 cursor will be placed when the query window pops onto
  262.                 the screen.  Normally this should be the first column
  263.                 of the input field.
  264.  
  265. 'input-width <integer>
  266.  
  267.                 The number of spaces allocated to the input field
  268.                 receiving the user's response to the query.
  269.  
  270. 'n-attr <integer>
  271.  
  272.                 The query normal attributes; the text attributes for
  273.                 the area outside the input field.  See WINDOW-SET-
  274.                 ATTRIBUTE in the TI Scheme Language Reference Manual
  275.                 for further information.
  276.  
  277. 'hl-attr <integer>
  278.  
  279.                 The query highlight attributes; the text attributes
  280.                 of the window for the area inside the input field.
  281.  
  282. 'border? <boolean>
  283.  
  284.                 If <boolean> evaluates to #t the window will have a
  285.                 border; if it evaluates to #f, it won't.
  286.  
  287. The <text> argument is a vector of strings as described above for
  288. make-popup-text-window.
  289.  
  290.  
  291.  
  292. POPUP QUERY WINDOW EXAMPLE
  293.  
  294. MENEX.S contains a single example of a popup query window.  This is
  295. the window that pops onto screen when the "Do a DOS command" menu
  296. item is selected from either of the menus of the menu example.  It
  297. uses the global variable *query-data* to hold its <init-list> and the
  298. global variable *query-text* to hold its <text> vector.  In this
  299. case, the input field appears on the second line of the window.
  300. Since no prompting text is wanted on the line with the input field,
  301. an empty string is used as a place holder in the <text> vector.
  302.  
  303. As in examples discussed above, the *text-color* environment is
  304. accessed to get text attributes.  The query window text appears as
  305. white against a blue background, and the input field text appears as
  306. black against a white background.  These color choices give good
  307. contrast on most color monitors.
  308.  
  309.  
  310. MAKE-VERTICAL-MENU
  311.  
  312. To create a vertical menu, an application program evaluates an
  313. expression of the form:
  314.  
  315.      (make-vertical-menu <init-list> <item-list>)
  316.  
  317. where <init-list> is a list of quoted symbols alternating with
  318. initial values:
  319.  
  320.      ('w-top <integer>
  321.       'w-left <integer>
  322.       'n-attr <integer>
  323.       'hl-attr <integer>
  324.       'border? <boolean>)
  325.  
  326. The entries in <init-list> are:
  327.  
  328. 'w-top <integer>
  329.  
  330.                 The row position of the window on the screen.
  331.  
  332. 'w-left <integer>
  333.  
  334.                 The column position of the window on the screen.
  335.  
  336. 'n-attr <integer>
  337.  
  338.                 The menu normal attributes; the text attributes of
  339.                 the menu for the area outside the bar cursor.  See
  340.                 WINDOW-SET-ATTRIBUTE in the TI Scheme Language
  341.                 Reference Manual for further information.
  342.  
  343. 'hl-attr <integer>
  344.  
  345.                 The menu highlight attributes; the text attributes of
  346.                 the menu for the area inside the bar cursor.
  347.  
  348. 'border? <boolean>
  349.  
  350.                 If <boolean> evaluates to #t the window will have a
  351.                 border; if it evaluates to #f, it won't.
  352.  
  353. and <item-list> is
  354.  
  355.      ((label selector action) ... )
  356.  
  357. or when multiple selector keys are to be assigned
  358.  
  359.      ((label (selector ... ) action) ... )
  360.  
  361. where
  362.  
  363. action
  364.  
  365.                 The action taken when this item is selected, a
  366.                 function with no arguments.
  367.  
  368. selector
  369.  
  370.                 A character.  The user may type this character as one
  371.                 way to select this menu item.
  372.  
  373. label
  374.  
  375.                 A text string describing the menu item; by
  376.                 convention, the first uppercase letter in the string
  377.                 should be the uppercase form of the selector.
  378.  
  379. The <item-list> argument can be viewed as a table with one line per
  380. menu item and three entries per line.  The table as a whole is a list
  381. and each line is a list; i.e., an <item-list> is a list of lists.
  382.  
  383.  
  384. MAKE-HORIZONTAL-MENU
  385.  
  386. To create a horizontal menu, an application program evaluates an
  387. expression of the form:
  388.  
  389.      (make-horizontal-menu <init-list> <item-list>)
  390.  
  391. and <init-list> is and <item-list> are as described above for the
  392. constructor make-vertical-window, except that <init-list> has the
  393. additional pair of entries:
  394.  
  395. 'label-spacing <integer>
  396.  
  397.                 The number of spaces to insert between labels.
  398.  
  399.  
  400. MENU EXAMPLES
  401.  
  402. In MENEX.S, both the horizontal menu and vertical menu use the <item-
  403. list> held in the global variable *item-list*.  This gives both menus
  404. the same five menu items.  On the other hand, the vertical menu is
  405. passed the <init-list> held in the global variable *vertical-menu-
  406. data*, while the horizontal menu is passed the <init-list> held in
  407. the global variable *horizontal-menu-data*.  In this case, the two
  408. <init-list>s differ only by the addition of the pair: 'label-spacing
  409. 2, but this is not the usual case.
  410.  
  411. Again the *text-color* environment is accessed to get text attributes
  412. for the <init-list>s.  On a color monitor, normal menu text appears
  413. as white against a blue background, and the text under the bar cursor
  414. appears as white against a red background.
  415.  
  416. Also note how the <item-list> assigned to the global variable *item-
  417. list* is specified by quasi-quoting the outer list and splicing in
  418. the actions in the inner lists with commas.  An alternative and
  419. completely equivalent way of specifying *item-list* is:
  420.  
  421.      (define *item-list*
  422.        (list ("Do a DOS Command" #\d do-dos)
  423.                ...
  424.              ( ... do-exit)))
  425.  
  426.  
  427. COMMON PROTOCOLS
  428.  
  429. Applications request services from Menus for Scheme by sending
  430. messages to instances of the constituent classes.  Message names need
  431. not be unique.  Indeed, more often than not they are shared between
  432. two or more classes.
  433.  
  434. In Menus for Scheme, restrictions have been placed on messages
  435. sharing names with other messages: any two messages with the same
  436. name also take the same arguments and, in the case where the returned
  437. value is of importance, the returned value is of same type.  When two
  438. classes share message names under this more restrictive convention,
  439. they are said to share a common protocol.  Common protocols make life
  440. easier for the applications programmer by reducing the amount of
  441. detail that must be mastered to use Menus for Scheme.
  442.  
  443. Consequently, wherever possible, common protocols have been used in
  444. Menus for Scheme. Adherence to this design goal has produced the
  445. benefit that most of the messages used by applications are understood
  446. by all four classes.
  447.  
  448.  
  449. MESSAGES UNDERSTOOD BY ALL FOUR CLASSES
  450.  
  451. (send <instance> get-w-top)
  452.  
  453.                 Returns the screen row-coordinate of the top row of a
  454.                 popup window or menu (an integer).
  455.  
  456. (send <instance> get-w-left)
  457.  
  458.                 Returns the screen column-coordinate of the left-most
  459.                 column of a popup window or menu (an integer).
  460.  
  461. (send <instance> get-w-rows)
  462.  
  463.                 Returns the vertical size (number of rows) of a popup
  464.                 window or menu (an integer).
  465.  
  466. (send <instance> get-w-cols)
  467.  
  468.                 Returns the horizontal size (number of columns) of a
  469.                 popup window or menu (an integer).
  470.  
  471. (send <instance> get-border?)
  472.  
  473.                 Returns #t if the window has a border; returns #f
  474.                 otherwise.
  475.  
  476. (send <instance> set-w-top <integer>)
  477.  
  478.                 Takes an integer and makes it the position of the top
  479.                 row of a popup window or menu.  Used for effect; it
  480.                 returns nothing useful.
  481.  
  482. (send <instance> set-w-left <integer>)
  483.  
  484.                 Takes an integer and makes it the position of the
  485.                 left-most column of a popup window or menu.  Used for
  486.                 effect; it returns nothing useful.
  487.  
  488. (send <instance> popup)
  489.  
  490.                 This is the releasing message.  Sending this message
  491.                 causes the window or menu receiving it to pop onto
  492.                 the screen.  Used for effect; it returns nothing
  493.                 useful.
  494.  
  495.  
  496.  
  497. MESSAGE UNDERSTOOD BY BOTH OF THE POPUP WINDOW CLASSES
  498.  
  499. (send <instance> set-text <text>)
  500.  
  501.                 Assigns a new text vector to the popup text or query
  502.                 window.  The argument <text> is a vector of the form
  503.  
  504.                      #(<string1> <string2> ... )
  505.  
  506.                 Each string appears on a separate line when the
  507.                 window pops onto the screen.  The size of window is
  508.                 automatically adjusted to contain the new text.  Used
  509.                 for effect; it returns nothing useful.
  510.  
  511.  
  512. MESSAGE UNDERSTOOD BY CLASS POPUP QUERY WINDOW
  513.  
  514. (send <instance> get-response)
  515.  
  516.                 Returns the string typed-in by the user in response
  517.                 to the query made by the window.
  518.  
  519.  
  520. MESSAGE UNDERSTOOD BY BOTH OF THE MENU CLASSES
  521.  
  522. (send <instance> set-item-index <integer>)
  523.  
  524.                 Assigns <integer> to the menu instance variable item-
  525.                 index.  Item-index determines which item description
  526.                 is highlighted by the bar cursor when the menu is
  527.                 released.  This message can be used to pre-select a
  528.                 menu item other than the first one.  The argument,
  529.                 <integer>, is reduced modulo the number of items in
  530.                 the menu, so a valid menu item will always be pre-
  531.                 selected.
  532.  
  533.  
  534. MESSAGE EXAMPLES
  535.  
  536. The procedures h-justify and v-justify found in file MENUS.S are
  537. good examples of how to use of the get-w-rows, get-w-cols, get-
  538. border?, set-w-top, and set-w-left messages to position a popup
  539. window or menu.  The do-dos procedure in MENEX.S shows how to use of
  540. the get-response message, which an application must send to get the
  541. response the user makes to a popup query window, and the do-freesp
  542. procedure shows how to use the set-text message to change the
  543. contents of a popup text window.  The do-v procedure shows how the
  544. set-item message is used to pre-select a menu item other than the
  545. first.
  546.  
  547. And, of course, there are many examples of the popup message since
  548. this is the one message that must always be sent by an application
  549. using Menus for Scheme.
  550.  
  551.  
  552. BUGS
  553.  
  554. The following are the known bugs of Menus for Scheme:
  555.  
  556.   1.  Nothing prevents the user from typing in a string too large for
  557.       the input field of a popup query window.
  558.  
  559.   2.  No check is made that the instances of popup windows and menus
  560.       created by Menus for Scheme actually fit on the screen.
  561.  
  562.  
  563. APPENDIX -- GLOSSARY OF SCOOPS TERMS
  564.  
  565. This appendix may be of help to you if you decide to modify MENUS.S.
  566.  
  567. ACTIVE VALUE.  A instance variable has an active value if its SET-
  568. METHOD (q.v.) calls a procedure rather than performing its normal
  569. function of assigning a new value to the instance variable.  The
  570. procedure gets passed the argument of the SET-METHOD, and whatever is
  571. returned by the procedure is assigned to the instance variable.
  572. Similarly, an instance variable also has an active value if its GET-
  573. METHOD (q.v.) calls a procedure rather than merely retrieving the
  574. current value of the instance variable.  In this case, the procedure
  575. is passed the current value, and the GET-METHOD returns whatever the
  576. procedure returns.  An instance variable that is both GETTABLE and
  577. SETTABLE can be doubly active.  Active values can transform the
  578. relatively tame operations of getting or setting into monsters with
  579. really hairy side-effects.
  580.  
  581. CLASS.  A collection of private variables (class variables and
  582. instance variables) and procedures (methods) that together function
  583. as an abstract data type.  The methods comprise the set of operations
  584. applicable to any object belonging to the class.  The private
  585. variables are visible to the methods, but not elsewhere, while the
  586. methods are generally visible.  The class concept in object-oriented
  587. languages has much in common to the package concept found  Modula-2
  588. or Ada.  However, in object-oriented languages, not only may
  589. programmers define their own classes, they may also add their own
  590. methods to any existing class.  Further, when a class is defined, it
  591. may incorporate the private variables and methods of an existing
  592. class, in which case the new class is said to inherit from the
  593. existing class.  SCOOPS provides a defining form, DEFINE-CLASS, for
  594. the creation of new classes, and a debugging tool, DESCRIBE, to
  595. permit examination of a class or an instance of a class.  Unlike
  596. Smalltalk-80, it does not provide any pre-defined classes for
  597. programmers to build on.
  598.  
  599. CLASS VARIABLE.  A variable that is private to a class, but shared by
  600. all the instances of the class.  In SCOOPS, class variables must be
  601. declared as members of the CLASSVARS list of a class definition.
  602. Class variables may have options declared for them.  See the glossary
  603. entry "instance variable" for a discussion of options.
  604.  
  605. COMPONENT CLASS.  A class defined to serve as a prefabricated
  606. subassembly from which other, more elaborate classes can be built.
  607. Contrast this with the glossary entry "instantiable class."
  608. Sometimes a class can be both a component class and an instantiable
  609. class.
  610.  
  611. GET-METHOD.  A method automatically generated by SCOOPS for an
  612. instance variable in response to a GETTABLE declaration in the
  613. options list of its class definition.  A GET-METHOD returns the value
  614. of its instance variable.  For example, if JOHN is an instance of
  615. some class which has the GETTABLE instance variable NAME and the copy
  616. of NAME belonging to JOHN has the string "John Q. Public" as its
  617. value, the message
  618.  
  619.      (SEND JOHN GET-NAME)
  620.  
  621. returns "John Q. Public".
  622.  
  623. INHERITANCE.  When a class inherits from a mixin (q.v.), it absorbs
  624. all the class variables, instance variables, and methods of the mixin
  625. as if they were defined in the inheriting class itself.  Permitting
  626. multiple mixins adds a complication to SCOOPS which doesn't come up
  627. in object-oriented languages permitting only a single mixin (e.g.,
  628. Smalltalk-80).  In SCOOPS, it is possible for two or more mixins to
  629. define methods or variables with conflicting names.  Even worse,
  630. mixins can have mixins, and some of these could also define methods
  631. or variables with conflicting names.  SCOOPS resolves such conflicts
  632. by giving priority to the first object (method or variable) it sees
  633. as it makes a depth-first search up through the class inheritance
  634. network.  Any other objects with the same name are shadowed.
  635.  
  636. INSTANCE.  Conceptually an instance is a data object which derives
  637. its type from its class.  The class imposes a structure and a set of
  638. operations on it.  In SCOOPS, instances are represented by
  639. environments and are created by calling the special form MAKE-
  640. INSTANCE with a class name and (optional) initial values for the
  641. inittable instance variables.
  642.  
  643. INSTANCE VARIABLE.  A variable that is private to instance of class.
  644. An instance variable may have options declared for it.  In SCOOPS,
  645. instance variables must be declared as members of the INSTVARS list
  646. of a class definition, and may have any of the options GETTABLE,
  647. SETTABLE, or INITTABLE (spelled thus in SCOOPS; other object-oriented
  648. programming system spell it INITABLE).  If an instance variable is
  649. declared GETTABLE, it becomes accessible to an application by means
  650. of a GET-METHOD (q.v.), which is automatically generated by SCOOPS.
  651. Similarly, if it is SETTABLE, it is modifiable by means of a SET-
  652. METHOD (q.v.), and if it is INITTABLE, it may be initialized by an
  653. application by means of SCOOPS-provided initialization code.
  654.  
  655. INSTANTIABLE CLASS.  A class from which useful instances can be
  656. constructed are said to be instantiable.  Contrast this with the
  657. glossary entry "component class."
  658.  
  659. MESSAGE.  A special kind of procedure call.  It passes an instance
  660. and possibly other arguments to a method.  In SCOOPS, messages are
  661. special forms distinguished by the initial keyword SEND.  Examples of
  662. messages can be found under the glossary entries "GET-METHOD" and
  663. "SET-METHOD."
  664.  
  665. METHOD.  An operation that an application may perform on an instance
  666. of a class.  Methods are represented in SCOOPS by procedures.  A
  667. defining form, DEFINE-METHOD, is provided.
  668.  
  669. MIXIN.  When a class is used as a component of another class, the
  670. first class is said to be a mixin of the second.  See the glossary
  671. entry "inheritance" for more information.
  672.  
  673. SET-METHOD.  A method automatically generated by SCOOPS for an
  674. instance variable in response to a SETTABLE declaration in the
  675. options list of its class definition.  A SET-METHOD assigns its
  676. argument to its instance variable.  For example, if JOHN is an
  677. instance of some class which has the SETTABLE instance variable NAME,
  678. then the message
  679.  
  680.      (SEND JOHN SET-NAME "John Q. Public")
  681.  
  682. assigns the string "John Q. Public" to the copy of NAME belonging to
  683. JOHN.  SET-METHODs are used for effect, nothing useful is returned.
  684.