home *** CD-ROM | disk | FTP | other *** search
/ The Developer Connection…ice Driver Kit for OS/2 3 / DEV3-D1.ISO / devtools / dataflex / text_win.pkg < prev    next >
Encoding:
Text File  |  1993-08-10  |  19.5 KB  |  696 lines

  1. //************************************************************************
  2. //
  3. // Copyright 1987-1992 Data Access Corporation, Miami FL, USA
  4. // All Rights reserved
  5. // DataFlex is a registered trademark of Data Access Corporation.
  6. //
  7. //
  8. //     $Source: /u3/source.30/product/pkg/RCS/text_win.pkg,v $
  9. //     $Revision: 1.1 $
  10. //     $State: Exp $
  11. //     $Author: james $
  12. //     $Date: 1992/09/08 14:43:09 $
  13. //     $Locker:  $
  14. //
  15. //     $Log: text_win.pkg,v $
  16. //Revision 1.1  1992/09/08  14:43:09  james
  17. //Initial revision
  18. //
  19. //Revision 1.14  92/06/10  02:27:53  lee
  20. //child wrapping now saves if autosave in origin OR in current object
  21. //
  22. //Revision 1.13  92/06/03  15:17:46  steve-l
  23. //altered Child_Wrapping for proper argument dereferencing
  24. //
  25. //Revision 1.12  92/06/03  15:10:46  steve-l
  26. //altered child_Wrapping for new argument
  27. //
  28. //Revision 1.11  92/06/01  17:57:26  steve-l
  29. //guarded REQUEST_SAVE behavior with server=0 | not(read-only(server))
  30. //
  31. //Revision 1.10  92/05/29  19:14:53  steve-l
  32. //REFRESH message altered to send entry_clear_all or entry_clear plus entry_display.
  33. //Old code retained commented-out in case of later re-optimization.
  34. //
  35. //Revision 1.9  92/05/29  14:05:54  lee
  36. //removed end_construct_* messages from mixins; now, classes that use the mixin
  37. //send the message that used to be sent by the end_construct_* message (for
  38. //efficiency).
  39. //
  40. //Revision 1.8  92/05/14  17:11:41  SWM
  41. //Updated Copyright slug.
  42. //
  43. //Revision 1.7  92/03/29  18:45:20  lee
  44. //added MSG_END_CONSTRUCT_OBJECT, moved ENDMAC macro stuff into END_CONSTRUCT-
  45. //OBJECT procedures (in .pkgs). moved Flag_ITems to list.pkg after generalizing
  46. //it based on PROTOTYPE_OBJECT instead of Whether or not it is a table-oriented
  47. //object. Moved define_access_keys mechanism completely into actionbr.pkg.
  48. //fixed two typos: import_class_protocol used !# instead of !3, and register-
  49. //procedure used !1 instead of !2.
  50. //
  51. //Revision 1.6  92/03/09  19:05:02  james
  52. //Added #CHKSUB directive to insure source
  53. //only compiled with correct revision of 
  54. //compiler.
  55. //
  56. //Revision 1.5  92/03/05  15:44:40  steve-l
  57. //Request_Superfind changed to set ERR false before calling server and to
  58. //check err (with found) afterward, in case of non-file-boundary errors.
  59. //Cut_Marked_Area and Paste messages altered to set Changed_State to true.
  60. //
  61. //Revision 1.4  92/01/13  14:49:12  steve-l
  62. //Added MSG_REFRESH
  63. //
  64. //Revision 1.3  92/01/12  15:27:38  steve-l
  65. //*** empty log message ***
  66. //
  67. //Revision 1.2  91/11/08  09:19:47  steve-l
  68. //it
  69. //
  70. //************************************************************************/
  71.  
  72. //************************************************************************
  73. //     File Name: Text_Win.Pkg
  74. // Creation Date: January 1, 1991
  75. // Modified Date: January 13, 1992
  76. //     Author(s): Steven A. Lowe
  77. //
  78. // This module contains the Text_Window class definition.
  79. //
  80. // This package implements an editing object for variable-length text fields
  81. // and sequential files.
  82. //************************************************************************/
  83.  
  84. #CHKSUB 1 1 // Verify the UI subsystem.
  85.  
  86. use NESTING     //include DEO nesting standard support module
  87. use NAVIGATE    //include DEO navigation standard support module
  88. use VERIFY      //include Verification support module
  89. use SERVER      //include Server support module
  90. use ACTIONBR    //include action-bar support module
  91. use FINDEDIT    //include Finding/Editing support module
  92.  
  93.  
  94. //
  95. // constants for REFRESH message parameter values
  96. //
  97. #IFSUB 'MODE_CLEAR'
  98. #ELSE
  99.     #REPLACE MODE_CLEAR             1  //notification from origin of clear
  100.     #REPLACE MODE_FIND_OR_CLEAR_SET 2  //notification from find or clear
  101.     #REPLACE MODE_CLEAR_ALL         3  //notification from clear-all
  102.     #REPLACE MODE_DELETE            4  //notification after successful delete
  103.     #REPLACE MODE_SAVE              5  //notification after successful save
  104. #ENDIF
  105.  
  106. //
  107. //Class: Text_Window
  108. //
  109. //SuperClass: EDIT
  110. //
  111. //Description: This class implements a text-editing object suitable for
  112. //  use with Entry_Form and Table objects, which may be bound to a
  113. //  sequential ASCII file or a database memo-field
  114. //
  115. //  Usage: object tw is a Text_Window FOR file.fieldname
  116. //           set location to ...
  117. //           set right_margin to ...
  118. //           set size to ...
  119. //         end_object
  120. //     
  121. Class Text_Window is an EDIT STARTMAC TxtEdStart
  122.  
  123.   //
  124.   //Operation: CONSTRUCT_OBJECT
  125.   //
  126.   //Assumption(s): none
  127.   //
  128.   //Goal(s): define an instance with appropriate keys and properties
  129.   //
  130.   //Algorithm: relies on support module constructors
  131.   //
  132.   //Usage: used internally
  133.   //
  134.   procedure construct_object
  135.     forward send construct_object
  136.     on_key kPrompt SEND Prompt PRIVATE
  137.     on_key kZoom   SEND Zoom   PRIVATE
  138.     Property integer Data_File  PRIVATE 0
  139.     Property integer Data_Field PRIVATE 0
  140.     send define_nesting    //invoke DEO nesting standard support constructor
  141.     send define_navigation //invoke DEO navigation standard support constructor
  142.     send define_verify     //invoke verify support constructor
  143.     send define_server     //invoke server support constructor
  144.     send define_action_bar //invoke action-bar support constructor
  145.     send define_find_edit  //invoke Finding/Editing support constructor
  146.   end_procedure
  147.  
  148.   IMPORT_CLASS_PROTOCOL Nesting_Mixin     //these statements
  149.   IMPORT_CLASS_PROTOCOL Navigate_Mixin    //import the methods
  150.   IMPORT_CLASS_PROTOCOL Verify_Mixin      //from the mixins
  151.   IMPORT_CLASS_PROTOCOL Server_Mixin      //into the current class
  152.   IMPORT_CLASS_PROTOCOL Action_Bar_Mixin  //instead of using
  153.   IMPORT_CLASS_PROTOCOL Find_Edit_Mixin   //bulky include-files
  154.  
  155.   procedure Zoom
  156.   end_procedure
  157.  
  158.   procedure Prompt
  159.   end_procedure
  160.  
  161.   //
  162.   // created for server and EntItem support
  163.   //
  164.   // returns non-zero if data invalid, 0 if no error (valid)
  165.   // no action by default; intended for augmentation/override
  166.   //
  167.   // NOTE: if this object's validation fails, this object should
  168.   //       take the focus.
  169.   //
  170.   function validate_items integer flag returns integer
  171.   end_function
  172.  
  173.   //
  174.   // created for Server support
  175.   //
  176.   procedure display
  177.     send entry_display 0 0
  178.   end_procedure
  179.  
  180.   //
  181.   // created for Server support
  182.   //
  183.   procedure clear
  184.     send entry_clear 1
  185.   end_procedure
  186.  
  187.   //
  188.   // created for Server support
  189.   //
  190.   procedure clear_all
  191.     send entry_clear_all 1
  192.   end_procedure
  193.  
  194.   //
  195.   // created for Server support
  196.   //
  197.   procedure clear_set
  198.     send entry_clear 1
  199.   end_procedure
  200.  
  201.   //
  202.   // created for FindEdit support
  203.   //
  204.   procedure Request_Clear
  205.     local integer obj#
  206.     get Server to obj#
  207.     if ((obj# <> 0 AND Changed_State(obj#)) OR ;
  208.         Changed_State(current_object)) begin
  209.       //
  210.       // modification for Verify support
  211.       //
  212.       if (Verify_Data_Loss(current_object) <> 0) procedure_return
  213.     end
  214.     //
  215.     // modification for Server support
  216.     //
  217.     if obj# ne 0 send clear to obj#
  218.     else send entry_clear 0
  219.     if (Auto_Top_Panel_State(current_object)) send beginning_of_panel
  220.   end_procedure
  221.  
  222.   //
  223.   // created for FindEdit support
  224.   //
  225.   procedure Request_Clear_All
  226.     local integer obj#
  227.     get Server to obj#
  228.     if ((obj# <> 0 AND Changed_State(obj#)) OR ;
  229.         Changed_State(current_object)) begin
  230.       //
  231.       // modification for Verify support
  232.       //
  233.       if (Verify_Data_Loss(current_object) <> 0) procedure_return
  234.     end
  235.     //
  236.     // modification for Server support
  237.     //
  238.     if obj# ne 0 send clear_all to obj#
  239.     else send entry_clear_all 0
  240.     if (Auto_Top_Panel_State(current_object)) send beginning_of_panel
  241.   end_procedure
  242.  
  243.   //
  244.   // created for FindEdit support
  245.   //
  246.   procedure Request_Delete
  247.     local integer obj#
  248.     indicate err false
  249.     get Server to obj#
  250.     if (obj# <> 0 AND can_delete(obj#) <> 0) begin
  251.       //
  252.       // modification for Verify support
  253.       //
  254.       if (Verify_Delete(current_object) <> 0) procedure_return
  255.       //
  256.       // modification for Server support
  257.       //
  258.       set changed_State to false
  259.       if (Deferred_State(current_object)) ;
  260.           send Request_Assign to obj# 0  //0 means main_file of Server
  261.       send Request_Delete to obj#
  262.       [not err] if (Auto_Clear_DEO_State(current_object)) send Request_Clear
  263.     end
  264.   end_procedure
  265.  
  266.   //
  267.   // created for FindEdit support
  268.   //
  269.   procedure Request_Save
  270.     local integer obj# chgdFlag retval
  271.  
  272.     get Server to obj#
  273.     if (obj# = 0 OR not(Read_Only_State(obj#))) begin
  274.       indicate err false
  275.       if ((obj# <> 0 AND Should_Save(obj#)) OR ;
  276.           Changed_State(current_object)) begin
  277.         if obj# ne 0 get Request_Validate of obj# to retval
  278.         else get Validate_Items FALSE to retval
  279.         if retval ne 0 procedure_Return
  280.         //
  281.         // modification for Verify support
  282.         //
  283.         if (Verify_Save(current_object) <> 0) procedure_return
  284.         //
  285.         // modification for Server support
  286.         //
  287.         if obj# ne 0 begin
  288.           if (Deferred_State(current_object)) ;
  289.               send Request_Assign to obj# 0   //0 means main_file of server
  290.           send Request_Save to obj#
  291.         end
  292.         else send write
  293.       end
  294.       [not err] if (Auto_Clear_DEO_State(current_object)) send Request_Clear
  295.     end
  296.   end_procedure
  297.  
  298.   //
  299.   // FindEdit support behavior
  300.   //
  301.   procedure Request_Find integer mode integer entUpdtFlag
  302.     local integer dataFile srvr# dfrdState
  303.     get Data_File to dataFile
  304.     get Server to srvr#
  305.     get Deferred_State to dfrdState
  306.  
  307.     //
  308.     // server augmentation
  309.     //
  310.     if (srvr# <> 0 AND dataFile > 0) begin
  311.       send Item_Find to srvr# mode dataFile ;
  312.         (Data_Field(current_object,CURRENT)) entUpdtFlag TRUE dfrdState
  313.       [found] if dfrdState send entry_display 0 0
  314.     end
  315.   end_procedure
  316.  
  317.   //
  318.   // created for FindEdit support
  319.   //
  320.   procedure Request_SuperFind integer mode
  321.     local integer obj#
  322.     //
  323.     // modification for Server support
  324.     //
  325.     get Server to obj#
  326.     if obj# ne 0 begin
  327.       indicate err false
  328.       send Request_SuperFind to obj# mode (data_file(current_object,CURRENT)) ;
  329.           (data_field(current_object,CURRENT))
  330.       [not found not err] begin
  331.         if mode lt 2 error 41
  332.         else error 42
  333.       end
  334.     end
  335.   end_procedure
  336.  
  337.   //
  338.   // created for navigation support
  339.   //
  340.   procedure child_Wrapping integer direction integer xorigID
  341.     local integer origID
  342.  
  343.     if NUM_ARGUMENTS gt 1 move xorigID to origID
  344.     else get focus of desktop to origID
  345.     if origID eq 0 move current_object to origID
  346.  
  347.     send activate
  348.     if direction EQ 1 begin
  349.         if (Auto_Save_State(origID)) send request_Save to origID
  350.         else if (auto_save_state(current_object)) send request_save
  351.     end
  352.     procedure_return 1
  353.   end_procedure
  354.  
  355.   //
  356.   // created for Navigation support
  357.   //
  358.   procedure Top_of_Panel
  359.     if (focus(desktop) <> current_object) send activate
  360.     forward send beginning_of_panel
  361.   end_procedure
  362.  
  363.   //
  364.   // created for Navigation support
  365.   //
  366.   procedure Bottom_of_Panel
  367.     local integer lastChild
  368.     //
  369.     // modification for Composition support
  370.     //
  371.     if (Has_Components_State(current_object)) begin
  372.       get Find_Last_DEO to lastChild
  373.       if lastChild ne 0 begin
  374.         send Bottom_Of_Panel to lastChild
  375.         procedure_return
  376.       end
  377.     end
  378.     send activate
  379.     forward send End_of_Panel
  380.   end_procedure
  381.  
  382.   //
  383.   // created for EntItem simulation
  384.   //
  385.   function data_file integer item# returns integer
  386.     local integer retval
  387.     get Text_Window.Data_File to retval
  388.     function_Return retval
  389.   end_function
  390.  
  391.   //
  392.   // created for EntItem simulation
  393.   //
  394.   procedure set data_File integer item# integer newval
  395.     set Text_Window.Data_File to newval
  396.   end_procedure
  397.  
  398.   //
  399.   // created for EntItem simulation
  400.   //
  401.   function data_field integer item# returns integer
  402.     local integer retval
  403.     get Text_Window.Data_Field to retval
  404.     function_Return retval
  405.   end_function
  406.  
  407.   //
  408.   // created for EntItem simulation
  409.   //
  410.   function item_count returns integer
  411.     function_return 1  //pretend to be a single item
  412.   end_function
  413.  
  414.   //
  415.   // created for EntItem simulation
  416.   //
  417.   procedure set data_Field integer item# integer newval
  418.     set Text_Window.Data_Field to newval
  419.   end_procedure
  420.  
  421.   //
  422.   // created for EntItem simulation: ecflag <> 0 means use Cleared-array
  423.   //
  424.   procedure Entry_Clear integer ecflag
  425.     local integer dfile
  426.     indicate FOUND as ecflag eq 0
  427.     [NOT FOUND] begin
  428.       get data_file item 0 to dfile
  429.       if dfile eq 0 indicate found TRUE
  430.       else is_file_included dfile 0
  431.     end
  432.     [FOUND] send Delete_Data
  433.   end_procedure
  434.  
  435.   //
  436.   // created for EntItem simulation:
  437.   // must clear if ecaDoneFlag = 0 OR if Data_File Îµ DONE-array
  438.   //
  439.   procedure Entry_Clear_All integer ecaDoneFlag
  440.     local integer dfile
  441.     indicate FOUND as ecaDoneFlag eq 0
  442.     [NOT FOUND] begin
  443.       get data_file item 0 to dfile
  444.       if dfile eq 0 indicate found TRUE
  445.       else is_file_included dfile 0
  446.     end
  447.     [FOUND] send Delete_Data
  448.   end_procedure
  449.  
  450.   procedure Read_File            //msg for action_bar
  451.     send entry_display 0 0
  452.   end_procedure
  453.  
  454.   //
  455.   // created for EntItem simulation and Server support:
  456.   //  if file# = 0, display only if Data_File is in Done-array
  457.   //  else display only if file# = Data_File
  458.   //
  459.   procedure Entry_Display integer file# integer flag
  460.     local integer oldval dFile
  461.     get data_file to dFile
  462.     if dfile eq 0 indicate found TRUE
  463.     else if file# eq 0 is_file_included dFile 1
  464.     else indicate found as (file# = dFile OR flag = TRUE)
  465.     [FOUND] begin
  466.       get dynamic_update_state to oldVal
  467.       set dynamic_update_state to false
  468.       send Delete_Data   //init buffer
  469.       send read  //read buffer from file
  470.       send beginning_of_data
  471.       set changed_state to FALSE          //read leaves it TRUE, so must reset!
  472.       set dynamic_update_state to oldVal
  473.     end
  474.   end_procedure
  475.  
  476.   //
  477.   // created for EntItem simulation and Server support
  478.   //  if file# = 0, display only if Data_File is in Done-array
  479.   //  else display only if file# = Data_File
  480.   //
  481.   procedure Entry_Update integer file# integer flag
  482.     local integer dFile
  483.     get Data_File to dFile
  484.     if dfile eq 0 indicate found TRUE
  485.     else if (file# = 0 AND flag = 3) is_file_included dFile 1
  486.     else indicate FOUND as (file# = dFile OR flag = TRUE OR file# = 0)
  487.     [FOUND] if (changed_State(current_object)) ne 0 send write
  488.   end_procedure
  489.  
  490.   //
  491.   //Operation: MODE_INSERT
  492.   //
  493.   //Assumption(s): none
  494.   //
  495.   //Goal(s): set INSERT_MODE to True
  496.   //
  497.   //Algorithm: sets INSERT_MODE to True
  498.   //
  499.   //Usage: 
  500.   //
  501.   procedure Mode_Insert
  502.     set insert_mode to true
  503.   end_procedure
  504.   //
  505.   //Operation: MODE_OVERWRITE
  506.   //
  507.   //Assumption(s): none
  508.   //
  509.   //Goal(s): set INSERT_MODE to False
  510.   //
  511.   //Algorithm: sets INSERT_MODE to False
  512.   //
  513.   //Usage: 
  514.   //
  515.   procedure Mode_Overwrite
  516.     set insert_mode to false
  517.   end_procedure
  518.   //
  519.   //Operation: MARK_BLOCK
  520.   //
  521.   //Assumption(s): none
  522.   //
  523.   //Goal(s): begin mark of text block in buffer
  524.   //
  525.   //Algorithm: sets COLUMN_MODE to False and sends MARK_ON
  526.   //
  527.   //Usage: 
  528.   //
  529.   procedure Mark_Block
  530.     set column_mode to false
  531.     send Mark_On
  532.   end_procedure
  533.   //
  534.   //Operation: MARK_COLUMN
  535.   //
  536.   //Assumption(s): none
  537.   //
  538.   //Goal(s): mark columnar area of text in buffer
  539.   //
  540.   //Algorithm: sets COLUMN_MODE to True and sends MARK_ON
  541.   //
  542.   //Usage: 
  543.   //
  544.   procedure Mark_Column
  545.     set column_mode to true
  546.     send Mark_On
  547.   end_procedure
  548.   //
  549.   //Operation: CUT_MARKED_AREA
  550.   //
  551.   //Assumption(s): none
  552.   //
  553.   //Goal(s): cut marked text to ClipBoard object
  554.   //
  555.   //Algorithm: sends CUT
  556.   //
  557.   //Usage: 
  558.   //
  559.   procedure Cut_Marked_Area
  560.     send cut true ClipBoard true
  561.     set changed_state to true
  562.   end_procedure
  563.   //
  564.   //Operation: COPY_MARKED_AREA
  565.   //
  566.   //Assumption(s): none
  567.   //
  568.   //Goal(s): copy marked text to ClipBoard
  569.   //
  570.   //Algorithm: sends CUT
  571.   //
  572.   //Usage: 
  573.   //
  574.   procedure Copy_Marked_Area
  575.     send cut true ClipBoard  false
  576.   end_procedure
  577.   //
  578.   //Operation: PASTE_BLOCK
  579.   //
  580.   //Assumption(s): none
  581.   //
  582.   //Goal(s): insert text from ClipBoard into buffer at current position
  583.   //
  584.   //Algorithm: sends PASTE to ClipBoard object
  585.   //
  586.   //Usage: 
  587.   //
  588.   procedure Paste_Block
  589.     send paste to clipBoard false current_object false
  590.     set changed_state to true
  591.   end_procedure
  592.  
  593.   //
  594.   //Operation: UPDATE_DEPENDENT_ITEMS
  595.   //
  596.   //Assumption(s): none
  597.   //
  598.   //Goal(s): do nothing (cancels message sent by Server-mixin)
  599.   //
  600.   //Algorithm: none
  601.   //
  602.   //Usage: 
  603.   //
  604.   procedure update_dependent_items
  605.   end_procedure
  606.  
  607.   procedure refresh integer notifyMode
  608. //    local integer datafile oldVal
  609.  
  610. //    get data_file item current  to datafile
  611. //    is_file_included datafile 0                     //look in cleared
  612. //    [found] send delete_data                        //clear if present
  613. //    is_file_included datafile 1                     //look in done
  614. //    [FOUND] begin                                   //read data
  615. //      get dynamic_update_state to oldVal
  616. //      set dynamic_update_state to false
  617. //      send Delete_Data                              //init buffer
  618. //      send read                                     //read buffer from file
  619. //      send beginning_of_data
  620. //      set changed_state to FALSE      //read leaves it TRUE, so must reset!
  621. //      set dynamic_update_state to oldVal
  622. //    end
  623.  
  624.     //
  625.     // above commented out and below added for backward compatibility
  626.     //
  627.  
  628.     if notifyMode eq MODE_CLEAR_ALL send entry_clear_all 1
  629.     else begin
  630.       send entry_clear 1
  631.       send entry_display 0 0
  632.     end
  633.  
  634.   end_procedure
  635.  
  636.   procedure End_Construct_Object
  637.     send Mark_Components      // nesting
  638.     send Define_Access_Keys 0 // action_bar_keys
  639.     forward send End_Construct_Object
  640.   end_procedure
  641.  
  642. end_class
  643.  
  644. //
  645. //Support Commands
  646. //
  647.  
  648. //
  649. // TxtEdStart <className> <ImageName> {ACTION_BAR <ActionBar#>} {POP_UP}
  650. //     {RING} {USING <DataSetID>} { FOR [{DMBS} <MemoFieldName>] | 
  651. //     [FILE <SequentialFileName>] }
  652. //
  653. // this macro handles the setting of a TextEditor's FILE_NAME attribute to
  654. // a default sequential file name or memo-field ID, in addition to the std.
  655. // DEO options
  656. //
  657. #COMMAND TxtEdStart R 
  658.   FORWARD_BEGIN_CONSTRUCT !1 0 !2 !3 !4 !5 !6 !7 !8 !9  //0 for null image
  659.   bind_For !2 !3 !4 !5 !6 !7 !8 !9
  660.   bind_using !2 !3 !4 !5 !6 !7 !8 !9
  661.   bind_action_bar !2 !3 !4 !5 !6 !7 !8 !9
  662.   bind_pop_up !2 !3 !4 !5 !6 !7 !8 !9
  663.   bind_ring !2 !3 !4 !5 !6 !7 !8 !9
  664. #ENDCOMMAND
  665.  
  666. #COMMAND Bind_For
  667.   #IF (!0>1)
  668.     #IFSAME !1 FOR
  669.       #IFSAME !2 FILE
  670.         set file_name to !3
  671.       #ELSE
  672.         #IFSAME !2 DBMS
  673.           #PUSH !u
  674.           #SET U$ !3  //get file#
  675.           set Data_File item 0 to |CI!u
  676.           #SET U$ %!3 //get field#
  677.           set Data_Field item 0 to |CI!u
  678.           #POP U$
  679.           send READ_DBMS !3 TRUE  //sets FILE_NAME to field ID (w/out read)
  680.         #ELSE
  681.           #PUSH !u
  682.           #SET U$ !2  //get file#
  683.           set Data_File item 0 to |CI!u
  684.           #SET U$ %!2 //get field#
  685.           set Data_Field item 0 to |CI!u
  686.           #POP U$
  687.           send READ_DBMS !2 TRUE  //sets FILE_NAME to field ID (w/out read)
  688.         #ENDIF
  689.       #ENDIF
  690.     #ELSE
  691.       Bind_For !2 !3 !4 !5 !6 !7 !8 !9
  692.     #ENDIF
  693.   #ENDIF
  694. #ENDCOMMAND
  695.                                                              
  696.