Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FreshWin (c) Fresh Technologies - <b>wproc() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WPROC()                                                    Window Function
 Purpose..: Define or return a window procedure
-------------------------------------------------------------------------------
 Syntax...: wProc( [<uWin> [, <bProc>]] ) --> bProc

 Arguments: [<uWin>] = the string identifier of the window
                       OR the reference to the window structure
                       returned as an array by wNew() or wArray().
                       If not passed, the function will operate on
                       the window in focus.

            [<bProc>]= code block attached to a window.
                       If not sent, the procedure for the
                       window in focus is returned. Otherwise,
                       the previous window procedure is returned.

 Returns..: <B> The code block assigned to the named window or,
            if unnamed, that of the window in focus.

 Source...: WPROC.PRG
-------------------------------------------------------------------------------
 Example..: The example uses wProc() to store a code block
            with the window, "HelpWin", which will read a text file.
            Later, the code block is executed to read the text
            file and display it in the opened window. Thus, you can
            change the contents of a text file without re-compiling.

              wNew     ( "HelpWin", 1, 1, 23, 76, "GR+/B" )
              wTitle   ( "HelpWin", "Help Screen", "GR+/B", W_TITLEBOX )
              wFrame   ( "HelpWin", B_THICK, "GR+/B" )
              wFooter  ( "HelpWin", " Any Key to Close " )
              wHowOpen ( "HelpWin", B_EXPLODELT( 30 ) )
              wHowClose( "HelpWin", B_IMPLODERT( 30 ) )
              wShadow  ( "HelpWin", B_SHADOW() )
              wProc    ( "HelpWin", { | aText | ReadShow( aText ) } )
              ...
              wOpen( "HelpWin" )
              eval( wProc( "HelpWin", aHelpText ) )
              ...

See Also: wNew()

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