Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - deactivategetpreblock() cancel the current pre-get function http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 deactivategetpreblock() Cancel the current pre-get function
------------------------------------------------------------------------------
 Declaration
   io.hdr

 Syntax
   proc deactivategetpreblock extern

 Arguments
   None.

 Return
   None.

 Description
   The deactivategetpreblock() procedure cancels the pre-get callback
   function previously installed by activategetpreblock(). You should call
   this procedure after performing read to make sure that future get/reads
   are not controlled by the pre-get function.

 Example
   #define EXAMPLE_IO
   #include example.hdr

   vardef static
      char( 10 ) cField1 := "          "
      char( 10 ) cField2 := "          "
      char( 10 ) cField3 := "          "
   enddef
   
   // This function provides a field-sensitive help message
   //
   func logical ShowFieldHelp
   param value uint uId
   do case
   case uId == 1
      @ 12, 0 ?? "This is field 1"
   case uId == 2
      @ 12, 0 ?? "This is field 2"
   case uId == 3
      @ 12, 0 ?? "This is field 3"
   endcase
   return( .t. )
   endfunc
   
   proc Test_deactivategetpreblock
   clear
   
   @ 1, 0 ?? "Field help active"
   activategetpreblock( ShowFieldHelp )
   @ 3,0 get cField1
   @ 5,0 get cField2
   @ 7,0 get cField3
   read
   @ 12, 0 say "               "
   
   deactivategetpreblock()
   
   @ 1, 0 ?? "No pre-get block active"
   @ 3,0 get cField1
   @ 5,0 get cField2
   @ 7,0 get cField3
   read
   endproc

   proc main
   Test_deactivategetpreblock()
   endproc

See Also: activategetpreblock() get

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson