






          Hi,
               Welcome to version 1.0 of the MB_Utils!  The MB_Utils are a
          few routines I've cooked up that I hope you find useful.  As of
          version 1.0, they mostly deal with list manipulation.  The high-
          level routines provide standard ways to selective item(s) from
          list(s) without a lot of hassle.  To see how the high-level
          routines work, open up the MB_UTest.FSL form and press the
          buttons.  Each button demos a different function call.  I haven't
          provided any examples of using the lower-level routines at this
          release, though the high-level routines are coded with the lower-
          level ones.  At release 1.0 I'm only providing delivered forms
          and library.  The delivered forms and library are, and will
          continue to be freeware.  If I can come up with a sufficient
          number of useful routines to be worth $15-20 I'll releas the
          source code as shareware.  If not, we'll see.

               THE ROUTINES CONTAINED IN THIS RELEASE ARE PROVIDED AS IS
          AND WITHOUT ANY GUARANTEE. MICHAEL BONNER ASSUMES NO
          RESPONSIBILITY FOR THE MATERIAL CONTAINED WITHIN. ALL MATERIAL IN
          THIS RELEASE ARE COPYRIGHT (C) 1993 BY MICHAEL BONNER.
          MATERIAL/CODE MAY BE INCLUDED IN APPLICATIONS PROVIDED THAT
          PROPER CREDIT IS GIVEN AS TO THE PROGRAM'S ORIGINATION.  I
          RESERVE ALL COMMERCIAL RIGHTS TO THESE ROUTINES.

               Since the delivered forms are freeware, I'll only spend
          minimal time attempting to support them on the PDOXWIN forum on
          compuserve.  I only log in every few days, and am trying to keep
          my connect time charges down for now.  If you do notice any bugs
          or anomolous behavior, please let me know so I can fix it in
          ASAP.  If you have any requests for functions you'd rather not
          spend the time to code, but which could be reusable, please let
          me know and I'll consider adding them to future releases of the
          library.  You can contact me via mail at 73250,1460.

               Enjoy...Michael Bonner




          The MB_Utils for Paradox for Windows currently consists of six
          files:

             MB_Utils.LDL -- The main library files
             MLSelDlg.FDL -- The Multiple List Selection dialog form
             SLSelDlg.FDL -- The Single List Selection dialog form

             MB_UTest.FSL --  Demonstration of the HIGH-LEVEL methods

             README.WP5 -- Readme file in Word Perfect 5.1 format
             README.TXT -- Readme file in ascii format



          MB_UTILS                      Page 1            by Michael Bonner














          CUSTOM TYPES

          The MB_Utils makes used of the following custom types:

             Type

               listArray = Array[] String

             EndType

          To used the MB_Utils, this type or its equivalent must be
          declared in the Type section of an object or one of its
          containers before the MB_Utils' method using that type can be
          called.


          HIGH-LEVEL METHODS

          The following are the "high-level" methods available within the
          MB_Utils library:


             method mb_selectItem(const selectionsList listArray, var
             method mb_selectItem(const selectionsList listArray, var
               selectedItem String) Logical
               selectedItem String) Logical

             DESCRIPTION
               This method opens the SLSelDlg form and replaces the items
               in that form's selections list object with the items from
               the selectionsList array.  It then allows the user to select
               a single item from the form's list while waiting for the
               user to press either the OK or Cancel button.  If the OK
               button is pressed, the method replaces the selecteItem
               string with the currently selected list item from the form's
               selection list object and returns TRUE after closing the
               SLSelDlg form.  If the Cancel button is pressed, the
               selectedItem string is blanked out and the method returns
               FALSE after closing the SLSelDlg form.

             ARGUMENTS
               selectionsList An array of strings to be placed in the
                              SLSelDlg's selections list object.

               selectedItem   If the SLSelDlg's OK button is pressed, this
                              string is set to the value of the currently
                              selected item in the form's selection list
                              object, otherwise it is set to a BLANK value.

             RETURNS
               TRUE -- the SLSelDlg's OK button was used to terminate the
               dialog
               FALSE -- the SLSelDlg's Cancel button was used to terminate
               the dialog

          MB_UTILS                      Page 2            by Michael Bonner















             method mb_selectItems(var availableList listArray, var
             method mb_selectItems(var availableList listArray, var
               selectedList listArray) Logical
               selectedList listArray) Logical

             DESCRIPTION
               This method opens the MLSelDlg form, replaces the items in
               that form's available list object with the items from the
               availableList array and replaces the items in that form's
               selected list object with the items from the selectedList
               array.  It then allows the user to move items between the
               form's two lists while waiting for the user to press either
               the OK or Cancel button.  If the OK button is pressed, the
               method replaces the items in the availableList array with
               the items from the form's available list object, replaces
               the items in the selectedList array with the items from the
               form's selected list object and returns TRUE after closing
               the MLSelDlg form.  If the Cancel button is pressed, the
               availableList and selectedList arrays remain unchanged and
               the method returns FALSE after closing the MLSelDlg form.

             ARGUMENTS
               availableList  An array of strings to be placed in the
                              MLSelDlg's available list object.  If the OK
                              button is pressed, this array is updated to
                              contain the items in the form's available
                              list object at that time.

               selectedList   An array of strings to be placed in the
                              MLSelDlg's selected list object.  If the OK
                              button is pressed, this array is updated to
                              contain the items in the form's selected list
                              object at that time.

             RETURNS
               TRUE -- the MLSelDlg's OK button was used to terminate the
               dialog
               FALSE -- the MLSelDlg's Cancel button was used to terminate
               the dialog


             method mb_selectTitledItem(const dialogTitle String, const
             method mb_selectTitledItem(const dialogTitle String, const
               selectionsList listArray, const selectionsListTitle String,
               selectionsList listArray, const selectionsListTitle String,
               var selectedItem String) Logical
               var selectedItem String) Logical

             DESCRIPTION
               This method opens the SLSelDlg form, sets the dialog
               windows' title to dialogTitle, sets the form's selection
               list object's title to selectionsListTitle and replaces the
               items in that form's selections list object with the items
               from the selectionsList array.  It then allows the user to
               select a single item from the form's list while waiting for
               the user to press either the OK or Cancel button.  If the OK

          MB_UTILS                      Page 3            by Michael Bonner














               button is pressed, the method replaces the selecteItem
               string with the currently selected list item from the form's
               selection list object and returns TRUE after closing the
               SLSelDlg form.  If the Cancel button is pressed, the
               selectedItem string is blanked out and the method returns
               FALSE after closing the SLSelDlg form.

             ARGUMENTS
               dialogTitle  Title to be assigned to the dialog window.

               selectionsList An array of strings to be placed in the
                              SLSelDlg's selections list object.

               selectionsListTitle Title to be assigned to the selections
                                   list object.

               selectedItem   If the SLSelDlg's OK button is pressed, this
                              string is set to the value of the currently
                              selected item in the form's selection list
                              object, otherwise it is set to a BLANK value.

             RETURNS
               TRUE -- the SLSelDlg's OK button was used to terminate the
               dialog
               FALSE -- the SLSelDlg's Cancel button was used to terminate
               the dialog


             method mb_selectTitledItems(const dialogTitle String, var
             method mb_selectTitledItems(const dialogTitle String, var
               availableList listArray, const availableListTitle String,
               availableList listArray, const availableListTitle String,
               var selectedList listArray, const selectedListTitle String)
               var selectedList listArray, const selectedListTitle String)
               Logical
               Logical

             DESCRIPTION
               This method opens the MLSelDlg form, sets the forms' title
               to dialogTitle, sets the form's available list object's
               title to availableListTitle, sets the form's selected list
               object's title to selectedListTitle, replaces the items in
               that form's available list object with the items from the
               availableList array and replaces the items in that form's
               selected list object with the items from the selectedList
               array.  It then allows the user to move items between the
               form's two lists while waiting for the user to press either
               the OK or Cancel button.  If the OK button is pressed, the
               method replaces the items in the availableList array with
               the items from the form's available list object, replaces
               the items in the selectedList array with the items from the
               form's selected list object and returns TRUE after closing
               the MLSelDlg form.  If the Cancel button is pressed, the
               availableList and selectedList arrays remain unchanged and
               the method returns FALSE after closing the MLSelDlg form.


          MB_UTILS                      Page 4            by Michael Bonner














             ARGUMENTS
               dialogTitle  Title to be assigned to the dialog window.

               availableList  An array of strings to be placed in the
                              MLSelDlg's available list object.  If the OK
                              button is pressed, this array is updated to
                              contain the items in the form's available
                              list object at that time.

               availableListTitle  Title to be assigned to the available
                                   list object.

               selectedList   An array of strings to be placed in the
                              MLSelDlg's selected list object.  If the OK
                              button is pressed, this array is updated to
                              contain the items in the form's selected list
                              object at that time.

               selectedListTitle   Title to be assigned to the selected
                                   list object.

             RETURNS
               TRUE -- the MLSelDlg's OK button was used to terminate the
               dialog
               FALSE -- the MLSelDlg's Cancel button was used to terminate
               the dialog


          LIST MANIPULATION METHODS

          The following are the list manipulation methods available withing
          the MB_Utils library:

          *** NOTE ***
             The UIObject referred to as listObj in the following methods
             should reference a list class object, not the field class
             object containing the list.  Incorrect UIObject classes are
             checked for and the list manipulation methods will do nothing
             and return blank values if they are supposed to return a
             value.


             method mb_addItem(const targetList UIObject, const itemToAdd
             method mb_addItem(const targetList UIObject, const itemToAdd
               String) smallInt
               String) smallInt

             DESCRIPTION
               This method will insert the itemToAdd into the targetList in
               ANSI order and return the index where the itemToAdd was
               placed.

             ARGUMENTS
               targetList   List from which the entry should be removed.

          MB_UTILS                      Page 5            by Michael Bonner














               itemToAdd String value to add to the list.

             RETURNS
               Location in the targetList where the item was inserted.


             method mb_arrayToList(const targetList UIObject, const lArray
             method mb_arrayToList(const targetList UIObject, const lArray
               listArray, const clearListFlag Logical)
               listArray, const clearListFlag Logical)

             DESCRIPTION
               This method will add the strings from the lArray to the
               targetList.  The strings will be added in ANSI order.  If
               clearListFlag is true, the targetList will be cleared before
               the new entries are added.

             ARGUMENTS
               targetList   List to which the lArray should be added.

               lArray  String array of items to add to the list.

               clearListFlag  If TRUE, the current entries in the
                              targetList will be removed before the new
                              entries from lArray are added.  If FALSE, the
                              new entries from lArray are added to the
                              existing items in the targetList.

             RETURNS
               NONE


             method mb_clearList(const targetList UIObject)
             method mb_clearList(const targetList UIObject)

             DESCRIPTION
               This method will clear all the list entries from the
               targetList.

             ARGUMENTS
               targetList   List from which the entries should be cleared.

             RETURNS
               NONE


             method mb_findInsertPoint(const targetList UIObject, const
             method mb_findInsertPoint(const targetList UIObject, const
               searchValue String) smallInt
               searchValue String) smallInt

             DESCRIPTION
               This method will return the position in the targetList where
               the searchValue should be inserted to be in ANSI order. 
               Duplicate searchValues will be inserted at the end of the
               duplicates.


          MB_UTILS                      Page 6            by Michael Bonner














             ARGUMENTS
               targetList   List to search for the insert point.

               searchValue  Item for which the insert point should be
                            found.

             RETURNS
               Index at which the searchValue should be inserted into the
               targetList to be in ANSI order.


             method mb_findItem(const targetList UIObject, const
             method mb_findItem(const targetList UIObject, const
               searchValue String, const ignoreCase logical) smallInt
               searchValue String, const ignoreCase logical) smallInt

             DESCRIPTION
               This method will return the position of the first entry in
               the targetList matching the searchValue.  If ignoreCase is
               TRUE, the match will not be case sensitive.

             ARGUMENTS
               targetList   List to search.

               searchValue  Item to search for.

               ignoreCase   If ignoreCase is TRUE, the search will not be
                            case sensitive.  If it is FALSE, the search
                            will be case sensitive.

             RETURNS
               Index of the first entry in the targetList that matches the
               searchValue or 0 if the searchValue was not found in the
               list.


             method mb_listToArray(const targetList UIObject, var lArray
             method mb_listToArray(const targetList UIObject, var lArray
               listArray)
               listArray)

             DESCRIPTION
               This method will clear the lArray and place a string into
               lArray which matches each entry from the targetList.

             ARGUMENTS
               targetList   List from which the entries should be obtained.

               lArray  String array to hold the entries from targetList.

             RETURNS
               NONE


             method mb_removeItem(const targetList UIObject, const
             method mb_removeItem(const targetList UIObject, const
               itemPosition smallInt) String
               itemPosition smallInt) String

          MB_UTILS                      Page 7            by Michael Bonner














             DESCRIPTION
               This method will remove the item from the targetList found
               at itemPosition and return the string value of the item
               removed.  To remove and item if you have the string value of
               the item, nest a mb_findItem inside the mb_removeItem.  I.E.
               mb_removeItem( targetList, mb_findItem("Value to find"))

             ARGUMENTS
               targetList   List from which the entry should be removed.

               itemPosition   Position in the list to be removed.

             RETURNS
               Value of the item removed or blank if the itemPosition
               specified is not within the size of the list.


          MISCELLANEOUS METHODS

          The following are other miscellaneous methods found in the
          MB_Utils library:

             mb_isMethod(const targObj UIObject, const methodName String)
             mb_isMethod(const targObj UIObject, const methodName String)
               logical
               logical

             DESCRIPTION
               This method tests whether or not methodName is defined for
               the targObj.

             ARGUMENTS
               targObj   Object to check for the method.

               methodName   Name of the method to check for.

             RETURNS
               TRUE is targObj.methodName is defined, FALSE otherwise.


             mb_setDebug(const newState logical)
             mb_setDebug(const newState logical)

             DESCRIPTION
               This method provides a semaphore to control whether
               debugging messages will be displayed for MB_Util library
               routines.  This mostly affects parameter checking messages
               telling if you pass a UIObject class that isn't a List as a
               targetList.

             ARGUMENTS
               newState  If newState is TRUE then the debug counter is
                         incremented.  If the counter is at 0 when newState
                         is true then the debug state is turned on.  If
                         newState is FALSE then the debug counter is

          MB_UTILS                      Page 8            by Michael Bonner














                         decremented.  If the debug counter falls to 0 then
                         the debug state is turned off.

             RETURNS
               NONE


             mb_setSmooth(const newState logical)
             mb_setSmooth(const newState logical)

             DESCRIPTION
               This method provides a semaphore to control whether
               delayScreenUpdates.  Calling this method

             ARGUMENTS
               newState  If newState is TRUE then the screen counter is
                         incremented.  If the counter is at 0 when newState
                         is true then a delayScreenUpdate(On) is called. 
                         If newState is FALSE then the screen counter is
                         decremented.  If the screen counter falls to 0
                         then a delayScreenUpdate(Off) is called.

             RETURNS
               NONE






























          MB_UTILS                      Page 9            by Michael Bonner







