home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / sharew / dobject / classlib.doc < prev    next >
Encoding:
Text File  |  1991-08-23  |  83.5 KB  |  1,561 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.                   dObject Version 1.0 Class Library Reference
  31.               Object-Oriented Programming Language for DBASE(tm)
  32.                 Copyright (c) 1991 Intelligent Systems Research
  33.                               All Rights Reserved
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  63.  
  64.  
  65.                           1.0 dObject Class Library
  66.  
  67.      This section describes the class library in detail.
  68.  
  69.  
  70.      1.1 Array Class
  71.  
  72.      Message        Argument(s)         Description
  73.  
  74.      at             self, Collection    returns the object stored at
  75.                                         index(es) specified    by the
  76.                                         Collection arg.  Each element in
  77.                                         the Collection arg   must be of
  78.                                         type Int. Example: a =
  79.                                         new(Array,[3,3,3]);
  80.                                         replace(a,[0,0,0],1);   ?
  81.                                         at(a,[0,0,0]);
  82.      class          self                returns the String "Array"
  83.      dim            self                returns Collection of array
  84.                                         dimensions for self
  85.      len            self                returns the defined size of self as
  86.                                         Int
  87.      replace        self, Collection,   stores Object arg at location
  88.                     Object              within self   as specified by
  89.                                         index(es) in Collection arg.  Each
  90.                                         element   in the Collection must be
  91.                                         of type Int. Example: a =
  92.                                         new(Array,[3,3,3]);
  93.                                         replace(a,[0,0,0],1);   ?
  94.                                         at(a,[0,0,0]);
  95.  
  96.      1.2 Nil Class
  97.  
  98.      Message        Argument(s)         Description
  99.  
  100.      class                              returns the String "Nil"
  101.      clearDevice                        clears the current BGI graphics
  102.                                         screen and moves CP to (0,0)   in
  103.                                         the current viewport.  see
  104.                                         Nil::clearViewPort
  105.      clearMemory                        removes all user class definitions,
  106.                                         method definitions,   and variables
  107.                                         from memory
  108.      clearViewPort                      clears the current BGI viewport and
  109.                                         moves the CP to (0,0)   see
  110.                                         Nil::clearDevice()
  111.      closeAllDbfs                       closes all currently open Dbffile
  112.                                         objects
  113.      closeAllWindows                    closes all currently open Window
  114.                                         objects
  115.      currentDbf                         returns currently selected database
  116.                                         as Dbffile object
  117.  
  118.  
  119.                                      - 2 -
  120.  
  121.  
  122.                                                Chapter 1: dObject Class Library
  123.  
  124.  
  125.      currentNdx                         returns currently selected index
  126.                                         file as Ndxfile object
  127.      currentWindow                      returns current window as Window
  128.                                         object
  129.      date                               returns current system date
  130.      disk                               returns the current disk and
  131.                                         directory path as String
  132.      inkey                              returns input from keyboard as Int;
  133.                                         key codes are defined in   the file
  134.                                         "keydef.do"
  135.      memory                             returns amount of free memory as
  136.                                         Real
  137.      osVersion                          returns DOS version as String
  138.      readchar                           returns next Char from current
  139.                                         input device
  140.      restoreCrtMode                     restores the original CRT mode
  141.                                         detected by initGraph
  142.      setupKeyboard                      allow user to interactively define
  143.                                         keyboard setup    and key
  144.                                         assignments using menu system.
  145.                                         Allows re-definition of editor
  146.                                         function keys.     See also:
  147.                                         String::loadConfig and
  148.                                         String::saveConfig methods
  149.      setupStatus                        allow user to interactively define
  150.                                         status line text for editor,  etc.
  151.      sysPath                            returns path from where dObject was
  152.                                         started
  153.      time                               returns current time as String
  154.                                         formatted as HH:MM:SS.XX    where
  155.                                         HH = hours    MM = minutes    SS =
  156.                                         seconds    XX = hundreths of second
  157.      detectGraph                        returns a Collection of 2 Int
  158.                                         values specifying the   current
  159.                                         graphics driver and mode.
  160.      getDriverName                      returns a String containing the
  161.                                         name of the current   graphics
  162.                                         driver.
  163.      getGraphMode                       returns an Int containing the
  164.                                         current graphics mode.
  165.      getMaxMode                         returns an Int containing the
  166.                                         maximum mode number   for the
  167.                                         currently loaded driver.
  168.      graphDefaults                      sets the graphics system to default
  169.                                         values:   Viewport: mamimum device
  170.                                         resolution   Clipping: on
  171.                                         Palette: default for drive
  172.                                         Background color: 0   Drawing
  173.                                         color: max color   Fill style:
  174.                                         solid fill   Fill color: max color
  175.                                          Line style: solid line   Hardware
  176.                                         font direction: horizontal   Font
  177.  
  178.  
  179.                                      - 3 -
  180.  
  181.  
  182. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  183.  
  184.  
  185.                                         size: 1   Font justification: left
  186.                                         top   Current position: home (0,0)
  187.      closeGraph                         closes the BGI graphics system,
  188.                                         unloads the driver from   memory,
  189.                                         and restores the CRT to its
  190.                                         original state    before
  191.                                         initGraph() was called.
  192.      restoreCrtMode                     restores the CRT to its original
  193.                                         state.
  194.      getX                               returns the x co-ordinate of the CP
  195.      getY                               returns the y co-ordinate of the CP
  196.      getMaxX                            returns the max X value for the
  197.                                         current graphics driver and mode
  198.      getMaxY                            returns the max Y value for the
  199.                                         current graphics driver and mode
  200.      getLineSettings                    returns collection of 3 Int args
  201.                                         representing   current line style,
  202.                                         user-defined pattern, and thickness
  203.                                            code as described above.
  204.      getArcCoords                       returns a Collection of 6 Int
  205.                                         values containing the   x,y center
  206.                                         point, x,y start pos, and x,y end
  207.                                         pos of the arc.     This is useful
  208.                                         if you need to make a line meet at
  209.                                         the    end of an arc.
  210.      getAspectRatio                     returns Collection of 2 Int value
  211.                                         representing the   x and y aspect
  212.                                         ratio correction values of the
  213.                                         current    graphics mode.
  214.      setAspectRatio self, Int           sets the x and y aspect-ratio
  215.                                         correction factors    to self and
  216.                                         Int arg respectively.
  217.      getBkcolor     self                returns the current background
  218.                                         color
  219.      getColor                           returns the current drawing color
  220.      getMaxColor                        returns the maximum color value
  221.                                         available in the   current graphics
  222.                                         mode
  223.      getFillPattern                     returns the current user-defined
  224.                                         fill pattern as   a Collection of 8
  225.                                         Int values.
  226.      getFillSettings                    returns a Collection of 2 Int
  227.                                         values; the first is   the current
  228.                                         fill pattern; the second is the
  229.                                         current    fill color
  230.      getTextSettings                    returns Collection of 4 Int values
  231.                                         indicating   current text font,
  232.                                         direction, size, and justification
  233.      getViewSettings                    returns a Collection of 5 Int value
  234.                                         specifying   the left, top right,
  235.                                         and bottom screen co-ordinates of
  236.                                          the current viewport, and an Int
  237.  
  238.  
  239.                                      - 4 -
  240.  
  241.  
  242.                                                Chapter 1: dObject Class Library
  243.  
  244.  
  245.                                         flag indicating if    clipping is
  246.                                         on or off.
  247.      getPalette     self                returns a Collection containing the
  248.                                         current palette
  249.      getDefaultPaletteself                returns a Collection containing the
  250.                                         default palette
  251.      getPaletteSize self                returns Int size of current Palette
  252.  
  253.      1.3 Int Class
  254.  
  255.      Message        Argument(s)         Description
  256.  
  257.      abs            self                returns absolute value of self as
  258.                                         Int
  259.      asString       self                returns self as a String
  260.      asReal         self                returns self as a Real
  261.      bitnot         self                returns self with NOT of each bit
  262.                                         as Int
  263.      bitand         self, Int           returns self ANDed with argument as
  264.                                         Int
  265.      bitor          self, Int           returns self ORed with argument as
  266.                                         Int
  267.      bitxor         self, Int           returns self XORed with argument as
  268.                                         Int
  269.      bitleft        self, Int           returns self left-shifted by
  270.  
  271.                                         argument as Int
  272.      bitright       self, Int           returns self right-shifted by
  273.                                         argument as Int
  274.      cday           self                returns name of nth day of week as
  275.                                         String
  276.      chr            self                returns Char with ASCII code of
  277.                                         self
  278.      class          self                returns the String "Int"
  279.      onError        self                called from dObject whenever error
  280.                                         occurs   prints error message to
  281.                                         error window for error code of self
  282.                                           you can re-define this method to
  283.                                         handle errors differently
  284.      executeKey     self                provide standard dObject key
  285.                                         handling from within form
  286.      exit           self                exits to dObject prompt with return
  287.                                         code of self
  288.      format         self, String        formats self according to format
  289.                                         spec in String arg    returns
  290.                                         String Format codes: %d  Normal
  291.                                         decimal number. (chars and
  292.                                         integers)    %u  As an unsigned
  293.                                         integer. (chars and integers)
  294.                                         %x  As a hexadecimal number. (chars
  295.                                         and integers).    %c  As a char.
  296.                                         (chars and integers).
  297.      onApplicationKeyself, Exp           evaluates Exp whenever application
  298.  
  299.  
  300.                                      - 5 -
  301.  
  302.  
  303. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  304.  
  305.  
  306.                                         key with   number of self is
  307.                                         pressed within text editor.
  308.      operator(+)    self, Int           return self plus argument
  309.      operator(-)    self, Int           returns self minus argument
  310.      operator(*)    self, Int           returns self multiplied by argument
  311.      operator(==)   self, Int           returns true if self is equal to
  312.                                         argument
  313.      operator(!=)   self, Int           returns true if self is not equal
  314.                                         to argument
  315.      operator(+)    self, Real          returns self plus argument as Real
  316.      operator(+)    self, Int           returns self plus argument as Int
  317.      operator(-)    self, Real          returns self minus argument as Real
  318.      operator(-)    self, Int           returns self minus argument as Int
  319.      operator(-)    self                returns negative of self as Int
  320.      operator(*)    self, Real          returns self multiplied by argument
  321.                                         as Real
  322.      operator(*)    self, Int           returns self multiplied by argument
  323.                                         as Int
  324.      operator(/)    self, Real          returns self divided by argument as
  325.                                         Real
  326.      operator(/)    self, Int           returns self divided by argument as
  327.                                         Int
  328.      operator(<)    self, Int           returns true if self less than
  329.                                         argument
  330.      operator(>)    self, Int           returns true if self greater than
  331.                                         argument
  332.      operator(<=)   self, Int           returns true if self less than or
  333.                                         equal to argument
  334.      operator(>=)   self, Int           returns true if self greater or
  335.                                         equal to argument
  336.      operator(<)    self, Real          returns true if self less than
  337.                                         argument
  338.      operator(>)    self, Real          returns true if self greater than
  339.                                         argument
  340.      operator(<=)   self, Real          returns true if self less than or
  341.                                         equal to argument
  342.      operator(>=)   self, Real          returns true if self greater or
  343.                                         equal to argument
  344.      say            self, Int, Char     writes Char to current window at y,
  345.                                         x of self, Int arg
  346.  
  347.      max            self, Int           returns max of self and argument as
  348.                                         Int
  349.      min            self, Int           returns min of self and argument as
  350.                                         Int
  351.      random         self                returns random number as Int with
  352.                                         self as modulus
  353.      randomInit     self                initializes random number generator
  354.                                         with self as seed
  355.  
  356.      setWriteMode   self                sets the writing mode for line
  357.                                         drawing   if self = 0, line color
  358.                                         will overwrite what is on screen
  359.                                         if self = 1, line color with be
  360.  
  361.  
  362.                                      - 6 -
  363.  
  364.  
  365.                                                Chapter 1: dObject Class Library
  366.  
  367.  
  368.                                         XOR'd with screen
  369.      sleep          self                sleeps for number of milliseconds
  370.                                         in self
  371.      sound          self, Int           generates sound of self ms duration
  372.                                         with    frequency = Int arg
  373.      space          self                returns blank String of length=self
  374.      textMode       self, Int           sets text mode where number of rows
  375.                                         = self   and number of columns =
  376.                                         Int arg, depending on hardware
  377.                                         normally set to 25,80 Example: on a
  378.                                         VGA, you can use textMode(50,80);
  379.      getPixel       self, Int           returns the pixel color at location
  380.                                         x,y specified   by self and Int arg
  381.      putPixel       self, Int, Int      sets the pixel at location x,y
  382.                                         (self, Int arg)   to color
  383.                                         specified by second Int arg
  384.      getImage       self, Int           returns image stored at x,y of
  385.                                         self, Int arg
  386.      imageSize      self, Int, Int, Int returns an Int number of bytes
  387.                                         necessary to store a rectangular
  388.                                         area of the screen.     Args are
  389.                                         left, top, right, and bottom
  390.                                         co-ordinates of the    region.
  391.      putImage       self, Int, Image,   writes an image to the screen at
  392.                     Int                 x,y of   self, first Int arg.
  393.                                         Second Int arg specifies how bits
  394.                                          of the image will be combined with
  395.                                         bits already on    the screen: copy
  396.                                         = 0, xor = 1, or = 2, and = 3, not
  397.                                         = 4.
  398.  
  399.      setViewPort    self, Int, Int, Int,sets the current viewport   to the
  400.                     Int                 absolute screen co-ordinates left,
  401.                                         top, right,    bottom corresponding
  402.                                         to the self argument and the first
  403.                                           three Int arguments respectively.
  404.                                          The final Int arg is a    flag
  405.                                         indicating if clipping is on or off
  406.                                         (0 = off,1 = on).
  407.      setActivePage  self                sets the active graphics page to
  408.                                         page number of self.
  409.      setVisualPage  self                sets the visible graphics page to
  410.                                         page number of self.
  411.      setTextJustify self, Int           sets justification to horizontal
  412.                                         code of   self and vertical code of
  413.                                         Int arg.     Horizontal values:
  414.                                         0=left,1=center,2=right   Vertical
  415.                                         values: 0=bottom,1=top
  416.      setTextStyle   self, Int, Int      sets current text font to self;
  417.                                         sets   current direction to first
  418.                                         Int arg, and current char size
  419.                                         to second Int arg.  Text direction
  420.                                         codes are 0=horizontal    (left to
  421.  
  422.  
  423.                                      - 7 -
  424.  
  425.  
  426. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  427.  
  428.  
  429.                                         right), 1=vertical (bottom to top).
  430.      setUserCharSizeself, Int, Int, Int sets width and height ratio for
  431.                                         stroked fonts.  Sets scale factors
  432.                                         for x width, x height,    y width,
  433.                                         and y height to self and the 3 Int
  434.                                         args    respectively.
  435.      setFillStyle   self, Int           sets the current fill pattern to
  436.                                         the predefined   pattern with a
  437.                                         code of self and the current fill
  438.                                         color to    the Int arg.  Pattern
  439.                                         codes are:   0 (EMPTY_FILL) - fill
  440.                                         with background color   1
  441.                                         (SOLID_FILL) - solid fill   2
  442.                                         (LINE_FILL) - fill with ----   3
  443.                                         (LTSLASH_FILL) - fill with ///   4
  444.                                         (SLASH_FILL) - fill with ///, thick
  445.                                         lines   5 (BKSLASH_FILL) - fill
  446.                                         with backslash, thick lines   6
  447.                                         (LTBACKSLASH_FILL) - fill with
  448.                                         backslash   7 (HATCH_FILL) - light
  449.                                         hatch fill   8 (XHATCH_FILL) -
  450.                                         heavy cross hatch fill   9
  451.                                         (INTERLEAVE_FILL) - interleaving
  452.                                         line fill   10 (WIDE_DOT_FILL) -
  453.                                         widely spaced dot fill   11
  454.                                         (CLOSE_DOT_FILL) - closely spaced
  455.                                         dot fill   12 (USER_FILL) -
  456.                                         user-defined fill pattern (see
  457.                                         Collection::setFillPattern())
  458.      floodFill      self, Int, Int      fills an enclosed area on the
  459.                                         graphics   screen.  Self and the
  460.                                         first Int arg form a "seek point":
  461.                                           within the enclosed area to be
  462.                                         filled.  The are bounded by    the
  463.                                         color indicated in the second Int
  464.                                         arg is flooded with    the current
  465.                                         fill pattern and fill color.  If
  466.                                         the seed point   is within an
  467.                                         enclosed area, the the inside will
  468.                                         be filled.     If the seed is
  469.                                         outside the enclosed the area, then
  470.                                         the    exterior will be filled.
  471.      setBkColor     self                sets the current background color
  472.                                         to self
  473.      setColor       self                sets the current drawing color to
  474.                                         self
  475.      setPalette     self, Int           changes the color value stored
  476.                                         under self to   the color in the
  477.                                         Int arg
  478.      rectangle      self, Int, Int, Int draws a rectangle in the current
  479.                                         line style, thickness, and drawing
  480.                                         color.  Arguments are    left, top,
  481.  
  482.  
  483.                                      - 8 -
  484.  
  485.  
  486.                                                Chapter 1: dObject Class Library
  487.  
  488.  
  489.                                         right, and bottom co-ordinates of
  490.                                         the rectangle    to draw (from
  491.                                         (left,top) to (right,bottom)).
  492.      bar            self, Int, Int, Int draws a rectangular bar in the
  493.                                         current   line style, thickness,
  494.                                         and drawing color, and fills it
  495.                                         using the current fill pattern and
  496.                                         fill color.  Arguments    are left,
  497.                                         top, right, and bottom co-ordinates
  498.                                         of the    rectangle to draw (from
  499.                                         (left,top) to (right,bottom)).
  500.      bar3d          self, Int, Int, Int,draws a rectangular 3-D bar in
  501.                     Int, Int            the current line style, thickness,
  502.                                         and drawing color,    and fills it
  503.                                         using the current fill pattern and
  504.                                         fill color.     Arguments are left,
  505.                                         top, right, and bottom co-ordinates
  506.                                         of    the rectangle to draw (from
  507.                                         (left,top) to (right,bottom)),
  508.                                         the depth of the bar, and a flag
  509.                                         indicating if a top   to the bar
  510.                                         should be drawn (0=no, 1=yes).
  511.      ellipse        self, Int, Int, Int,draws an ellipse in the current
  512.                     Int, Int)           drawing color.  Args are center
  513.                                         point X,Y, start angle,    end
  514.                                         angle, and X and Y radius.
  515.      fillEllipse    self, Int, Int, Int)draws an ellipse and fills it with
  516.                                          the current fill pattern in the
  517.                                         current fill color.     Args are X,
  518.                                         Y, X radius, and Y radius.
  519.      pieSlice       self, Int, Int, Int,draws and fills a pie slice using
  520.                     Int                 current fill pattern and drawing
  521.                                         color.  Arguments are    X,Y
  522.                                         center, start angle, end angle, and
  523.                                         radius.
  524.      pieSliceXY     self, Int, Int, Int,draws and fills an   elliptical pie
  525.                     Int, Int            slice using current fill pattern
  526.                                         and drawing    color.  Arguments
  527.                                         are X,Y center, start angle, end
  528.                                         angle,    X radius, and Y radius.
  529.      setAspectRatio self, Int           sets the x and y aspect-ratio
  530.                                         correction factors    to self and
  531.                                         Int arg respectively.
  532.      arc            self, Int, Int, Int,draws a circular arc in the current
  533.                     Int                    drawing color.  Arguments are
  534.                                         X,Y center, start angle,    end
  535.                                         angle, and radius.
  536.      circle         self, Int, Int      draws a circle in the current
  537.                                         drawing color.   Arguments are X,Y
  538.                                         of center, and radius.
  539.      setLineStyle   self, Int, Int      sets the current line style to the
  540.                                          code in self; sets the current
  541.  
  542.  
  543.                                      - 9 -
  544.  
  545.  
  546. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  547.  
  548.  
  549.                                         pattern to the first Int    arg
  550.                                         code, and the current thickness to
  551.                                         the second Int arg.     Line style
  552.                                         codes are 0=solid,1=dotted,
  553.                                         2=center, 3=dashes,
  554.                                         4=user-defined.  You can define a
  555.                                         line style by using a    16-bit
  556.                                         pattern in the first Int arg, where
  557.                                         whenver a bit   in the pattern is
  558.                                         set to one, the corresponding pixel
  559.                                         in    the line is drawn in the
  560.                                         current drawing color.  For
  561.                                         example, a solid line is
  562.                                         represented by the value $FFFF
  563.                                         (all one's), and a dashed line is
  564.                                         $3333 or $0F0F.     Thickness codes
  565.                                         in the second Int arg are 0=1 pixel
  566.                                            wide, 3=3 pixels wide.
  567.      line           self, Int, Int, Int draws a line in the current drawing
  568.                                         color.   Arguments are X,Y of start
  569.                                         point and X,Y of end point.
  570.      linerel        self, Int           draws a line in the current drawing
  571.                                         color from   current position to
  572.                                         relative offset of self, Int arg.
  573.      lineto         self, Int           draws a line in the current drawing
  574.                                         color from   current position to
  575.                                         X,Y position of self, Int arg.
  576.      moveTo         self, Int           moves the CP to X,Y of self, Int
  577.                                         arg
  578.      moveRel        self, Int           moves the CP the X,Y relative
  579.                                         distance
  580.      getModeName    self                returns a String containing the
  581.                                         graphics mode   name for the mode
  582.                                         with Int code of self.
  583.      getModeRange   self                returns a Collection of 2 Int
  584.                                         values specifying   the min and max
  585.                                         mode values for the graphics driver
  586.                                            with Int code of self.
  587.      setGraphMode   self                changes the graphics mode to self.
  588.      outTextXY      self, Int, String   outputs String arg to x,y location
  589.                                           of self, Int arg in current font,
  590.                                         style, and size
  591.  
  592.      1.4 Long Class
  593.  
  594.      Message        Argument(s)         Description
  595.  
  596.      asAddress      self                returns self converted to Address
  597.      asInt          self                returns self converted to Int
  598.      asReal         self                returns self converted to Real
  599.      class          self                returns the String "Long"
  600.      operator(+)    self, Long          returns self plus argument as Long
  601.  
  602.  
  603.                                      - 10 -
  604.  
  605.  
  606.                                                Chapter 1: dObject Class Library
  607.  
  608.  
  609.      operator(-)    self, Long          returns self minus argument as Long
  610.      operator(-)    self                returns negative of self as Long
  611.      operator(*)    self, Long          returns self multiplied by argument
  612.                                         as Long
  613.      operator(/)    self, Long          returns self divided by argument as
  614.                                         Long
  615.  
  616.      1.5 Real Class
  617.  
  618.      Message        Argument(s)         Description
  619.  
  620.      abs            self                returns absolute value of self as
  621.                                         Real
  622.      asInt          self                returns self converted to Int
  623.      asDate         self                returns Date having julian number
  624.                                         of self
  625.      asLong         self                returns self converted to Long
  626.      asString       self                returns self as a String
  627.      class          self                returns the String "Real"
  628.      cos            self                returns cosine of self as Real;
  629.                                         self in radians
  630.      format         self, String        formats self into String using
  631.                                         format    contained in String arg
  632.                                         Format codes: %g  Reals in shortest
  633.                                         posible format (default for reals)
  634.                                           %e  Reals in exponetial notation
  635.                                           %f  Reals in fixed notation
  636.      max            self, Real          returns max of self and argument as
  637.                                         Real
  638.      min            self, Real          returns min of self and argument as
  639.                                         Real
  640.      operator(+)    self, Real          returns self plus argument as Real
  641.      operator(+)    self, Int           returns self plus argument as Real
  642.      operator(-)    self, Real          returns self minus argument as Real
  643.      operator(-)    self, Int           returns self minus argument as Real
  644.      operator(-)    self                returns negative of self as Real
  645.      operator(*)    self, Real          returns self multiplied by argument
  646.                                         as Real
  647.      operator(*)    self, Int           returns self multiplied by argument
  648.                                         as Real
  649.      operator(/)    self, Real          returns self divided by argument as
  650.                                         Real
  651.      operator(/)    self, Int           returns self divided by argument as
  652.                                         Real
  653.      operator(<)    self, Real          returns true if self less than
  654.                                         argument
  655.      operator(>)    self, Real          returns true if self greater than
  656.                                         argument
  657.      operator(<=)   self, Real          returns true if self less than or
  658.                                         equal to argument
  659.      operator(>=)   self, Real          returns true if self greater than
  660.                                         or equal to argument
  661.  
  662.  
  663.                                      - 11 -
  664.  
  665.  
  666. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  667.  
  668.  
  669.      operator(          returns self raised to power in
  670.     self, Real
  671.                                         Real arg
  672.      operator(==)   self, Real          returns true if self is equal to
  673.                                         argument
  674.      operator(!=)   self, Real          returns true if self is not equal
  675.                                         to argument
  676.      sin            self                returns sine of self as Real;  self
  677.                                         in radians
  678.      sqrt           self                returns square root of self as Real
  679.      tan            self                returns tangent of self as Real;
  680.                                         self in radians
  681.      trunc          self                returns self truncated after
  682.                                         decimal point
  683.  
  684.      1.6 String Class
  685.  
  686.      Message        Argument(s)         Description
  687.  
  688.      operator(==)   self, String        returns true if self is equal to
  689.                                         argument
  690.      operator(!=)   self, String        returns true if self is not equal
  691.                                         to argument
  692.      operator(<)    self, String        returns true if self less than
  693.                                         argument
  694.      operator(>)    self, String        returns true if self greater than
  695.                                         argument
  696.      operator(<=)   self, String        returns true if self less than or
  697.  
  698.                                         equal to argument
  699.      operator(>=)   self, String        returns true if self greater than
  700.                                         or equal to argument
  701.      operator(+)    self, String        returns self concatenated with
  702.                                         argument
  703.      operator($)    self, String        returns true if argument is
  704.                                         substring of self
  705.      accept         self                prints self as prompt to current
  706.                                         window   returns String read as
  707.                                         input from keyboard
  708.      asDate         self, String        returns Date resulting from
  709.                                         conversion of self    under format
  710.                                         specified by String arg
  711.      asExp          self                returns Exp parsed from text in
  712.                                         self
  713.      asId           self                returns self as an Exp of type ID
  714.                                         (like #a);
  715.      asInt          self                returns self as an Int
  716.      asLogical      self                returns self as Logical (self must
  717.                                         be "T" or "F")
  718.      asLong         self                returns self as Long
  719.      asLower        self                returns self with all lowercase
  720.                                         char
  721.      asUpper        self                returns self with all uppercase
  722.                                         char
  723.  
  724.  
  725.                                      - 12 -
  726.  
  727.  
  728.                                                Chapter 1: dObject Class Library
  729.  
  730.  
  731.      at             self, Int           returns character at position
  732.                                         indicated by argument
  733.      createDbf      self, Collection    returns Dbffile of new DBASE file
  734.                                         created with name of self    and
  735.                                         fields defined in Collection arg
  736.      class          self                returns the String "String"
  737.      cursorstate    self                sets cursor to on/off state
  738.                                         specified in self ("on" or "off")
  739.      deleteFile     self                deletes the DOS file with name
  740.                                         specified by self
  741.      dir            self, String        returns filename selected from
  742.                                         directory menu as String with
  743.                                         directory path in "self" and file
  744.                                         pattern in argument
  745.      disk           self                sets the current disk and directory
  746.                                         to path in self
  747.      display        self                displays self in current window
  748.      do             self                executes statements in file with
  749.                                         filename of self
  750.      envSymbol      self                returns value of DOS symbol
  751.                                         specified by self
  752.      edit           self                calls editor on self in current
  753.                                         window
  754.      editFile       self                calls editor on contents of file
  755.                                         with filename of self
  756.      errorMessage   self, Int           returns String error message from
  757.                                         error file    in filename specified
  758.                                         in self   Int arg = error number to
  759.                                         find message for
  760.      existFile      self                returns logical T if file with name
  761.                                         of self exists   else returns
  762.                                         logical F
  763.      fileString     self                returns contents of file with
  764.                                         filename of self as String
  765.      format         self, String        returns String arg formatted using
  766.                                         format spec in self Format codes:
  767.                                         %s  Strings.
  768.      help           self                displays hypertext help for
  769.                                         topic=self
  770.      installUserDriverself                installs third-party BGI driver
  771.                                         with filename of self   returns Int
  772.                                         driver number of installed driver
  773.      installUserFontself                installs thirt-party BGI font with
  774.                                         filename of self   returns Int font
  775.                                         number of installed font
  776.      len            self                returns length of self as Int
  777.      loadConfig     self                load keyboard config from .CFG file
  778.                                         with filename of self
  779.      match          self, String        returns String that matches self
  780.                                         against GREP pattern    in String
  781.                                         arg. Special characters:   '
  782.                                         start-of-line anchor   '$'
  783.  
  784.  
  785.                                      - 13 -
  786.  
  787.  
  788. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  789.  
  790.  
  791.                                         end-of-line anchor   '.' matches
  792.                                         any character   '[' start a
  793.                                         character class   ']' end a
  794.                                         character class   ' negates
  795.                                         character class if 1st char   '*'
  796.                                         Keene closure (matches 0 or more)
  797.                                         '+' positive closure (1 or more)
  798.                                         '?' optional closure (0 or more)
  799.      mkdir          self                creates DOS directory with path
  800.                                         specified in self
  801.      replace        self, Char, Char    replaces every instance of first
  802.                                         char within self   with second
  803.                                         char.  Replaces string in-place
  804.                                         (does not    simply return a copy
  805.                                         of self)
  806.      reverse        self                returns self with characters in
  807.                                         reverse order
  808.      saveConfig     self                save current keyboard config in
  809.                                         .CFG file with filename of self
  810.      set            self                returns the value of the SET
  811.                                         variable named by self
  812.      set            self, Value         sets the SET variable named by self
  813.                                         to Value Example: set("echo", T);
  814.      split          self                returns Collection of 3 Strings
  815.                                         containing split of self    into
  816.                                         path, filename, and file extension
  817.      system         self, Int           executes DOS command in self   Int
  818.                                         arg=0 do not reset video   Int
  819.                                         arg=1 reset video to state it was
  820.                                         in before DOS cmd   returns the Int
  821.                                         DOS error code returned by the
  822.                                         command
  823.      token          self                returns a Collection of 2 Strings
  824.                                         first String is the next token
  825.                                         within self   second String is
  826.                                         resulting string (self without
  827.                                         first token)  Example: token("1 2
  828.                                         3");    returns ["1","2 3 "]
  829.      trim           self                returns self with trailing blanks
  830.                                         trimmed
  831.      wrap           self, Int, Char     returns self word wrapped   Int arg
  832.                                         = max column width to word wrap for
  833.                                           Char arg = char to embed at word
  834.                                         wrap points
  835.      outText        self                outputs a string to the current
  836.                                         graphics position (CP).
  837.      textHeight     self                returns height of self in pixels as
  838.                                         Int
  839.      textWidth      self                returns width of self in pixels as
  840.                                         Int
  841.  
  842.  
  843.  
  844.  
  845.                                      - 14 -
  846.  
  847.  
  848.                                                Chapter 1: dObject Class Library
  849.  
  850.  
  851.      1.7 Char Class
  852.  
  853.      Message        Argument(s)         Description
  854.  
  855.      asc            self                returns Int numeric value of self
  856.      asLower        self                returns self converted to lower
  857.                                         case
  858.      asUpper        self                returns self converted to upper
  859.                                         case
  860.      class          self                returns the string "Char"
  861.      diskspace      self                returns Real number of bytes on
  862.                                         disk with drive letter of self
  863.      unread         self                pushes self back into keyboard
  864.                                         buffer
  865.  
  866.      1.8 Logical Class
  867.  
  868.      Message        Argument(s)         Description
  869.  
  870.      class          self                returns the string "Logical"
  871.      operator(&)    self, Logical       returns true if self and arg are
  872.                                         true
  873.      operator(|)    self, Logical       returns true if self or arg is true
  874.      operator(!)    self                returns logical NOT of self
  875.  
  876.      1.9 Date Class
  877.  
  878.      Message        Argument(s)         Description
  879.  
  880.      asString       self, String        returns String of self formatted as
  881.                                         specified in String arg Codes:  CC
  882.                                         2-digit century,  YY 2-digit year,
  883.                                         MM 2-digit month   MMM 3-char
  884.                                         month, DD 2-digit day Examples:
  885.                                         YY.MM.DD, CCYY.MM.DD, MM/DD/YY,
  886.                                         DD-MM/YY,    DD-MM/CCYY, MMM DD/YY
  887.      asJulian       self                returns julian number of self as
  888.                                         Real
  889.      class          self                returns the String "Date"
  890.      cmonth         self                returns name of month of self as
  891.                                         String
  892.      day            self                returns day of self as Int
  893.      dow            self                returns number of day of week of
  894.                                         self as Int
  895.      month          self                returns month of self as Int
  896.      operator(+)    self, Int           returns date of self plus number of
  897.                                         days in argument
  898.      operator(-)    self, Int           returns date of self minus number
  899.                                         of days in argument
  900.      operator(==)   self, Date          returns true if self is equal to
  901.                                         argument
  902.      operator(!=)   self, Date          returns true if self is not equal
  903.  
  904.  
  905.                                      - 15 -
  906.  
  907.  
  908. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  909.  
  910.  
  911.                                         to argument
  912.      operator(<)    self, Date          returns true if self less than
  913.                                         argument
  914.      operator(>)    self, Date          returns true if self greater than
  915.                                         argument
  916.      operator(<=)   self, Date          returns true if self less than or
  917.                                         equal to argument
  918.      operator(>=)   self, Date          returns true if self greater or
  919.                                         equal to argument
  920.      setDay         self, Int           returns self with day = argument
  921.      setMonth       self, Int           returns self with month = argument
  922.      setYear        self, Int           returns self with year = argument
  923.      year           self                returns year of self as Int
  924.  
  925.      1.10 Collection Class
  926.  
  927.      Message        Argument(s)         Description
  928.  
  929.      append         self, Object        appends Object arg to end of self
  930.      at             self, Int           returns object at position
  931.                                         specified by Int arg
  932.      avg            self                returns average of all elements in
  933.                                         self
  934.      class          self                returns the string "Collection"
  935.      head           self                returns first element of self
  936.      insert         self, Object        inserts Object arg at front of self
  937.      intersect      self, Collection    returns intersection of self and
  938.                                         Collection arg
  939.      len            self                returns the number of elements in
  940.                                         self as Int
  941.      max            self                returns maximum element in self
  942.      min            self                returns minimum element in self
  943.      operator(+)    self, Object        returns self with Object arg
  944.                                         appended
  945.      operator($)    self, Object        returns Logical .T. if Object arg
  946.                                         is in self
  947.      remove         self, Object        returns self with every occurrence
  948.                                         of Object arg deleted
  949.      replace        self, Object, Objectreturns self with every occurrence
  950.                                         of   first Object arg replaced by
  951.                                         second Object arg
  952.      reverse        self                returns self in reverse order
  953.      sort           self                returns self with elements in
  954.                                         ascending order
  955.      subset         self, Collection    returns Logical .T. if Collection
  956.                                         arg    is a subset of self; else
  957.                                         returns logical .F.
  958.      sum            self                returns all elements in self added
  959.      tail           self                returns self without first element
  960.      union          self, Collection    returns union of self and
  961.                                         Collection arg
  962.      unique         self                returns Collection with distinct
  963.  
  964.  
  965.                                      - 16 -
  966.  
  967.  
  968.                                                Chapter 1: dObject Class Library
  969.  
  970.  
  971.                                         elements in self only
  972.      drawPoly       self                draws a polygon with as many points
  973.                                         as   Int value pairs in the
  974.                                         collection; each Int pair is an
  975.                                         x,y co-ordinate of a vertex on the
  976.                                         polygon.
  977.      fillPoly       self                draws a polygon with as many points
  978.                                         as   Int value pairs in the
  979.                                         collection and fills it using
  980.                                         the current fill style and fill
  981.                                         color; each Int pair is    an x,y
  982.                                         co-ordinate of a vertex on the
  983.                                         polygon.
  984.      setAllPalette  self                sets list of new palette colors.
  985.                                         self    must be a Collection of 8
  986.                                         Int values specifying the colors.
  987.      setFillPattern self, Int           sets the current fill pattern to a
  988.                                          user-defined Collection of 8 Int
  989.                                         color values. Each Int    value
  990.                                         represents a byte of 8 pixels;
  991.                                         whenever a bit in    the pixel
  992.                                         pattern is set to 1, the
  993.                                         corresponding pixel will    be
  994.                                         plotted.  The Int arg is the fill
  995.                                         color to use.
  996.  
  997.      1.11 Menu Class
  998.  
  999.      Message        Argument(s)         Description
  1000.  
  1001.      choice         self, Int           returns index of choice picked when
  1002.                                         menu is executed   menu bar is
  1003.                                         positioned at choice number
  1004.                                         indicated by Int arg   menu is left
  1005.                                         displayed in current window   (see
  1006.                                         Menu::remove())
  1007.      class          self                returns the String "Menu"
  1008.      remove         self                removes self from screen
  1009.      window         self                returns the Window associated with
  1010.                                         self
  1011.  
  1012.      1.12 Linemenu Class
  1013.  
  1014.      Message        Argument(s)         Description
  1015.  
  1016.      choice         self                returns index of choice picked when
  1017.                                         menu is executed   menu is left
  1018.                                         displayed in current window    (see
  1019.                                         Linemenu::remove())
  1020.      class          self                returns the String "Linemenu"
  1021.      remove         self                removes self from screen
  1022.  
  1023.  
  1024.  
  1025.                                      - 17 -
  1026.  
  1027.  
  1028. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1029.  
  1030.  
  1031.      1.13 Window Class
  1032.  
  1033.      Message        Argument(s)         Description
  1034.  
  1035.      class          self                returns the string "Window"
  1036.      clear          self                clears text in self
  1037.      clearGets      self                removes all SAY and GET fields
  1038.                                         within self
  1039.      clearKeys      self                removes all onKey definitions for
  1040.                                         self
  1041.      contents       self                returns String containing current
  1042.                                         Window contents
  1043.      currentField   self                returns Field object that is
  1044.                                         current    for full screen input
  1045.                                         mode
  1046.      draw           self                draws all SAY and GET fields within
  1047.                                         self but does not read them
  1048.      firstField     self                returns first GET Field defined for
  1049.                                         self.    See Window::read,
  1050.                                         Window::nextField,
  1051.                                         Window::prevField.
  1052.      gotoField      self, Field         positions cursor at beginning of
  1053.                                         field and    enters full screen
  1054.                                         input mode.  See Window::read.
  1055.      nextField      self                returns Field immediately after
  1056.                                         current input Field.   see
  1057.                                         Window::read, Window::firstField,
  1058.                                         Window::prevField.
  1059.      onKey          self, Int, Exp      called from Window::read() method
  1060.                                         whenever a key   is pressed from
  1061.                                         within the form; default is to call
  1062.                                            Int::executeKey() but can be
  1063.                                         re-defined to allow application
  1064.                                         to trap certain keys   Int arg =
  1065.                                         key to trap   Exp arg = expression
  1066.                                         to evaluate when key equal to Int
  1067.                                         arg is pressed
  1068.      prevField      self                returns Field immediately prior to
  1069.                                         current input Field.   see
  1070.                                         Window::read, Window::firstField,
  1071.                                         Window::nextField.
  1072.      read           self                draws all SAY and GET fields.
  1073.                                         Positions cursor at first GET field
  1074.                                         and enters full screen    input
  1075.                                         mode.  The following keys are
  1076.                                         active:   Esc - exits the form and
  1077.                                         returns to dObject> prompt   Home -
  1078.                                         Positions the current DBF file at
  1079.                                         the first record and displays it
  1080.                                         End - Positions the current DBF
  1081.                                         file at the last record and
  1082.                                         displays it   PgUp - Positions the
  1083.  
  1084.  
  1085.                                      - 18 -
  1086.  
  1087.  
  1088.                                                Chapter 1: dObject Class Library
  1089.  
  1090.  
  1091.                                         current DBF file at the previous
  1092.                                         record and displays it   PgDn -
  1093.                                         Positions the current DBF file at
  1094.                                         the next record and displays it
  1095.                                         Tab - Positions the cursor at the
  1096.                                         beginning of the next display field
  1097.                                           Up - Positions the cursor up one
  1098.                                         line   Down - Positions the cursor
  1099.                                         down one line   Right - Positions
  1100.                                         the cursor right one space within
  1101.                                         current display field   Left -
  1102.                                         Positions the cursor left one space
  1103.                                         within the current display field
  1104.                                         F10 - exits the form and returns to
  1105.                                         dObject> prompt
  1106.      remove         self                removes self from the screen
  1107.      resize         self                allows user to interactively resize
  1108.                                         self using arrow keys
  1109.      resize         self, Int, Int, Int,change size of self to y, x, ylen,
  1110.                     Int                 xlen Int args
  1111.      say            self, Int, Int,     displays Value argument within self
  1112.                     Value, Int, Int       Int arg #1 = y coordinate of
  1113.                                         field   Int arg #2 = x coordinate
  1114.                                         of field   Value arg = value to
  1115.                                         disp   Int arg#3 = length of field
  1116.                                          Int arg#4 = color attribute of
  1117.                                         field
  1118.      sayExp         self, Int, Int, Exp,displays Exp argument within self
  1119.                     Int, Int            but waits until "read" is issued
  1120.                                         before evaluating Exp   Int arg #1
  1121.                                         = y coordinate of field   Int arg
  1122.                                         #2 = x coordinate of field   Value
  1123.                                         arg = value to disp   Int arg#3 =
  1124.                                         length of field   Int arg#4 = color
  1125.                                         attribute of field
  1126.      scroll         self, Int, Int      scrolls self in Y,X direction of
  1127.                                         Int args
  1128.      select         self                makes self the current Window.  see
  1129.                                         Nil::currentWindow.
  1130.      setupColor     self, Int           interactively change window color
  1131.                                         based on menu choice   Int arg=0
  1132.                                         setup window color   Int arg=1
  1133.                                         setup frame color
  1134.      setFrame       self, Int, String,  sets frame characteristics   Int
  1135.                     Int, String         arg #1 = frame color (attribute)
  1136.                                         String arg #1 = window title   Int
  1137.                                         arg #1 = position of start of title
  1138.                                         (255 = center)   String arg #2 =
  1139.                                         characters in frame string
  1140.      setTitle       self, String        returns self with title = argument
  1141.      setPosition    self, Int, Int, Int,returns self with position = Int
  1142.                     Int                 arguments (x, y, length, height)
  1143.  
  1144.  
  1145.                                      - 19 -
  1146.  
  1147.  
  1148. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1149.  
  1150.  
  1151.      title          self                returns String containing title of
  1152.                                         self
  1153.  
  1154.      1.14 Dbffile Class
  1155.  
  1156.      Message        Argument(s)         Description
  1157.  
  1158.      asCollection   self                returns array of values of argument
  1159.                                         expression evaluated for each
  1160.                                         record in self that is true for the
  1161.                                         current filter expression
  1162.      avg            self, Exp           returns average value of Exp
  1163.                                         evaluated across all records
  1164.      blank          self                fills the current record buffer for
  1165.                                         self with blanks
  1166.      class          self                returns the String "Dbffile"
  1167.      close          self                closes the .DBF file for self;
  1168.                                         returns nil
  1169.      bot            self                positions current record at bottom
  1170.                                         of file using current index file.
  1171.                                          If no index is open,  go to
  1172.  
  1173.                                         physical last record in self
  1174.                                         Returns 0 if OK,  3 if EOF,  -1 if
  1175.                                         Error
  1176.      clearIndexes   self                closes all open index files
  1177.                                         associated with self   returns Int
  1178.                                         0 if OK,  -1 if error
  1179.      clearRelation  self                Removes all relationships for self
  1180.                                           (see Dbffile::setRelation())
  1181.                                         returns Int 0 if OK,  -1 if error
  1182.      createIndex    self, String,       creates a new DBASE index file on
  1183.                     String, Int, Int    self   String arg1 = name of index
  1184.                                         to create   String arg2 = text for
  1185.                                         expression to evaluate for index
  1186.                                         Int arg1 = unique flag  1=unique
  1187.                                         0=not unique   Int arg2 = safety
  1188.                                         flag    1=do not remove existing
  1189.                                         file with this name    0=remove any
  1190.                                         existing file with this name
  1191.                                         returns Int  reference number of
  1192.                                         index created if OK,  -1 if error
  1193.      date           self                returns creation date of self
  1194.      decimals       self, String        returns Int number of decimals in
  1195.                                         field named in String arg
  1196.      delete         self, Long          deletes record number = Long arg
  1197.                                         within self
  1198.      eof            self                returns Logical .T. if current
  1199.                                         record is at end of file;   else
  1200.                                         returns Logical .F.
  1201.      fieldString    self                returns the internal buffer for
  1202.                                         field name = String arg   as String
  1203.                                         at current record of self; can be
  1204.  
  1205.  
  1206.                                      - 20 -
  1207.  
  1208.  
  1209.                                                Chapter 1: dObject Class Library
  1210.  
  1211.  
  1212.                                         used to determine    if named field
  1213.                                         is blank or empty
  1214.      go             self, Long          returns self with current record at
  1215.                                         record number    specified by arg
  1216.      htExpand       self, Ndxfile, Int, expands text into hypertext    self
  1217.                     Int, String         arg = DBASE file containing topic
  1218.                                         and text fields to use as hypertext
  1219.                                         dictionary   Ndxfile arg = DBASE
  1220.                                         index on topic field   Int arg#1 =
  1221.                                         color to highlight topics with in
  1222.                                         expanded text   Int arg#2 = length
  1223.                                         of topic field   String arg#1 =
  1224.                                         normal text to be expanded into
  1225.                                         hypertext   Returns String
  1226.                                         containing hypertext
  1227.      insert         self, Long          The record in the record buffer
  1228.                                         becomes the record number
  1229.                                         indicated by the Long arg.  All of
  1230.                                         the former records starting at
  1231.                                         this position are copied forward
  1232.                                         one record to insert the new
  1233.                                         record.  All of the open index
  1234.                                         files for self are then reindexed
  1235.                                         to   maintain their correct record
  1236.                                         numbers.     Returns 0 if OK,  -1
  1237.                                         if error.
  1238.      locate         self, String, Value locates record with field of name
  1239.                                         in String arg    and value of Value
  1240.                                         arg through sequential search
  1241.                                         starting at current record
  1242.      lock           self, Int, Int      attempts to lock self; returns 0 if
  1243.                                         successful   if argument#1 is 0,
  1244.                                         locks record   if argument#1 is 1,
  1245.                                         locks entire file   if argument#2
  1246.                                         is 0,  waits until lock succeeds
  1247.                                         if argument#s is 1,  does not wait
  1248.      max            self, Exp           returns maximum value of Exp
  1249.                                         evaluated for all records in file
  1250.      min            self, Exp           returns minimum value of Exp
  1251.                                         evaluated for all records in file
  1252.      name           self                returns filename of self
  1253.      numFields      self                returns Int number of fields in
  1254.                                         self
  1255.      numRecords     self                returns Long number of records in
  1256.                                         self
  1257.      pack           self, Long, Long    deletes records in self    from
  1258.                                         recno=first arg to recno=second arg
  1259.      recall         self, Long          recalls record number = Long arg
  1260.                                         from being deleted
  1261.      recno          self                returns Long current record number
  1262.                                         of self
  1263.      seek           self, Object        goes to record number in self that
  1264.  
  1265.  
  1266.                                      - 21 -
  1267.  
  1268.  
  1269. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1270.  
  1271.  
  1272.                                         matches Object arg   by doing a
  1273.                                         binary search of currently selected
  1274.                                         .NDX file   returns Int values:   0
  1275.                                         exact match with key was found   1
  1276.                                         partial match   2 key not found;
  1277.                                         position is on record after where
  1278.                                         key should be in Dbffile   3 end of
  1279.                                         file   -1 error
  1280.      select         self                selects self as current database
  1281.                                         returns Int ref number of self
  1282.      setFilter      self, Exp           returns self with filter set to
  1283.                                         argument   Future operations on
  1284.                                         self will only process records that
  1285.                                            cause Exp to evaluate to Logical
  1286.                                         .T. Example: d =
  1287.                                         new(Dbffile,"test");
  1288.                                         setFilter(d,#recno(d) > 5);
  1289.      setRelation    self, String, Int,  Creates a relationship between a
  1290.                     Int, Int            controlling    database and self.
  1291.                                         When self is repositioned,  the
  1292.                                         expression in the String arg is
  1293.                                         looked up in the index file    to
  1294.                                         move to a record in the related
  1295.                                         database.  If no index    file is
  1296.                                         specified the expression should
  1297.                                         return a Long value    that is used
  1298.                                         as the record number to go to in
  1299.                                         the related    database.   String
  1300.                                         arg = text for expression to
  1301.                                         evaluate as described above   Int
  1302.                                         arg1 = database reference number
  1303.                                         for related database   Int arg2 =
  1304.                                         index reference number of index to
  1305.                                         use (-1 if no index)   Int arg3 =
  1306.                                         Missing code; specifies action to
  1307.                                         take if record not found in related
  1308.                                         database    =0 use blank record
  1309.                                         =1 generate error message    >=1
  1310.                                         default record number   Returns Int
  1311.                                         0 if OK,  -1 if error
  1312.      skip           self, Long          increments current record position
  1313.                                         by argument
  1314.      structure      self                returns Collection of field
  1315.                                         definitions for self    (see
  1316.                                         Dbffile::create())
  1317.      sum            self, Exp           returns sum of Exp evaluated for
  1318.                                         all records in file
  1319.      top            self                positions current record in self at
  1320.                                         top of file using current index
  1321.                                         If no index is open,  go to
  1322.                                         physical first record in self
  1323.                                         returns 0 if OK,  -1 if error
  1324.  
  1325.  
  1326.                                      - 22 -
  1327.  
  1328.  
  1329.                                                Chapter 1: dObject Class Library
  1330.  
  1331.  
  1332.      unlock         self, Int           attempts to unlock self   If Int
  1333.                                         argument is 0 unlocks record; else
  1334.                                         unlocks file   returns Int 0 if OK,
  1335.                                          -1 if error
  1336.      width          self, String        returns width of field specified by
  1337.                                         argument as Int
  1338.      write          self, Long          write the contents of the current
  1339.                                         record to file    at record number
  1340.                                         indicated by Long arg.    If Long
  1341.                                         arg = 0,  append new record at end
  1342.                                         of file.    Returns 0 if OK,  -1 if
  1343.                                         error
  1344.      zap            self, Long, Long    delete records in file from record
  1345.                                         number specified in first Long arg
  1346.                                         up to record number specified by
  1347.                                         second Long arg   Returns 0 if OK,
  1348.                                         -1 if error
  1349.  
  1350.      1.15 Ndxfile Class
  1351.  
  1352.      Message        Argument(s)         Description
  1353.  
  1354.      bot            self                positions current record of self at
  1355.                                         bottom
  1356.      class          self                returns the String "Ndxfile"
  1357.      close          self                closes the .NDX file for self
  1358.      lock           self, Int           locks self   Int arg = wait flag
  1359.                                         =0 do not wait if file is locked by
  1360.                                         another user   =1 keep trying (once
  1361.                                         per second) if file is locked
  1362.                                         returns 0 if OK,  -1 if error,  -2
  1363.                                         if file is locked by     another
  1364.                                         user and wait=0 was specified
  1365.      reindex        self                reindexes self   returns 0 if OK,
  1366.                                         -1 if error
  1367.      select         self                selects self as current index file
  1368.                                          returns Int ref number of self
  1369.      skip           self, Long          skips the number of records in self
  1370.                                         indicate by Long arg   returns 0 if
  1371.                                         OK,  -1 if error
  1372.      top            self                positions current record of self at
  1373.                                         top of file   returns 0 if OK,  -1
  1374.                                         if error
  1375.      type           self                returns Char type of self using
  1376.                                         DBASE conventions for type   C=char
  1377.                                         , D=date,  N=numeric,  M=memo
  1378.      unlock         self                unlocks self; returns Int 0 if OK,
  1379.                                         -1 if error
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.                                      - 23 -
  1387.  
  1388.  
  1389. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1390.  
  1391.  
  1392.      1.16 File Class
  1393.  
  1394.      Message        Argument(s)         Description
  1395.  
  1396.      class          self                returns the String "File"
  1397.      close          self                closes self; returns nil
  1398.      flush          self                flushes self; returns nil
  1399.      readDevice     self                sets current input device to self
  1400.      seek           self, Int, Int      sets byte position within self
  1401.                                         using offset in first Int arg
  1402.                                         second Int arg = offset position
  1403.                                         flag    =0 offset from beginning of
  1404.                                         file    =1 offset from current
  1405.                                         position    =2 offset from end of
  1406.                                         file
  1407.      writeDevice    self                sets current output device to self
  1408.  
  1409.      1.17 Exp Class
  1410.  
  1411.      Message        Argument(s)         Description
  1412.  
  1413.      class          self                returns the String "Exp"
  1414.      eval           self                evaluates self and returns value
  1415.      inherit        self, Exp,          creates new class with parent class
  1416.                     Collection          specified in self    Exp arg = ID
  1417.                                         name of new class   Collection arg
  1418.                                         = collection of String(s)
  1419.                                         specifying names of   class
  1420.                                         variables in the new class Example:
  1421.                                         inherit(Int, Newint, ["i"]);
  1422.      friend         self, Exp           defines class in Exp arg as a
  1423.                                         friend of class in self   (both
  1424.                                         arguments must be of type ID)
  1425.                                         allows class in Exp arg access to
  1426.                                         variables and private    methods
  1427.                                         for class in self
  1428.      name           self                returns String that is name of Exp
  1429.                                         if Exp is of type ID
  1430.      new            self...             returns a new object of type
  1431.                                         specified by self (self=ID).
  1432.                                         Arguments depend on class type.
  1433.                                         Example: i = new(Int, 1);   r =
  1434.                                         new(Real, 1.1);   l = new(Logical,
  1435.                                         T);   w = new(Window, 1, 31, 3, "
  1436.                                         title ", 0, 0, 24, 80);   db =
  1437.                                         new(Dbffile, "help");   ndx =
  1438.                                         new(Ndxfile, db, "help");   arr =
  1439.                                         new(Array,[3,3,3]);   coll =
  1440.                                         new(Collection);   file =
  1441.                                         new(File,"prn:",1,0,0);   m =
  1442.                                         new(Linemenu,1,5,54,54,[1,2,3,4,5,6],
  1443.  
  1444.  
  1445.  
  1446.                                      - 24 -
  1447.  
  1448.  
  1449.                                                Chapter 1: dObject Class Library
  1450.  
  1451.  
  1452.                                         ["first","second","third","fourth","fifth","sixth"]);
  1453.  
  1454.      release        self                release variable named by self.
  1455.                                         Example:  release(#a);
  1456.      releaseClass   self                releases all class definitions,
  1457.                                         all variables,  and all method
  1458.                                         definitions for class named by
  1459.                                         self.  Example:
  1460.                                         releaseClass(Newint);
  1461.  
  1462.      1.18 Address Class
  1463.  
  1464.      Message        Argument(s)         Description
  1465.  
  1466.      asLong         self                returns self as Long value
  1467.      operator(*)    self                returns contents at address of self
  1468.                                         as Object
  1469.  
  1470.      1.19 Object Class
  1471.  
  1472.      Message        Argument(s)         Description
  1473.  
  1474.      parent         self                returns parent object of self if
  1475.                                         self is NOT a base class
  1476.      slot           self, String        returns value of class variable
  1477.                                         within self    with name = String
  1478.                                         argument.  This method only works
  1479.                                         from within methods defined for
  1480.                                         self's class !
  1481.      operator(&)    self                returns address of self as Address
  1482.                                         object
  1483.      replace        self, Object        replaces value of self with Object
  1484.                                         arg
  1485.  
  1486.      1.20 Field Class
  1487.  
  1488.      Message        Argument(s)         Description
  1489.  
  1490.      attr           self                returns the color attribute of self
  1491.      class          self                returns the String "Field"
  1492.      col            self                returns the column position of self
  1493.      name           self                returns the name of self
  1494.      num            self                returns the field number of self
  1495.      onKey          self, Int, Exp      called from Window::read() method
  1496.                                         whenever a key   is pressed from
  1497.                                         within the form; default is to call
  1498.                                            Int::executeKey() but can be
  1499.                                         re-defined to allow application
  1500.                                         to trap certain keys   Int arg =
  1501.                                         key to trap   Exp arg = expression
  1502.                                         to evaluate when key equal to Int
  1503.                                         arg is pressed
  1504.  
  1505.  
  1506.                                      - 25 -
  1507.  
  1508.  
  1509. dObject Version 1.0 (c) 1991 Intelligent Systems Research
  1510.  
  1511.  
  1512.      row            self                returns the row position of self
  1513.      setPicture     self, String        sets the picture for self to String
  1514.                                         arg.   Special characters in
  1515.                                         format:   ! Converts letters to
  1516.                                         uppercase; accepts all characters
  1517.                                         A Allows letters only   L
  1518.                                         Translates characters to logical
  1519.                                         values (T, t, F, f, Y, y, N, n)   N
  1520.                                         Allows letters and numbers   9
  1521.                                         Allows digits only   X Allows
  1522.                                         numbers, spaces, signs, and decimal
  1523.                                         points only
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  
  1563.  
  1564.  
  1565.  
  1566.                                      - 26 -
  1567.  
  1568.