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>wcargoput() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WCARGOPUT()                                                Window Function
 Purpose..: Attach cargo to or replace cargo of a window
-------------------------------------------------------------------------------
 Syntax...: wCargoPut( [<uWin>], <cCargoID>, <uCargo> ) --> uCargo

 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.

            <cCargoID>  = cargo identification. There is no default.

            <uCargo>    = cargo to be used. There is no default.

 Returns..: <U> The previous cargo for <cCargoID> or NIL if not
            defined previously.

 Remark...: The function works whether the window is open or not.

 Source...: WCARGO.PRG
-------------------------------------------------------------------------------
 Example..: . The example adds the data used by the window
              procedure Edit( ) to the windows cargo slot.

                 FILE 1
                 ------
                 local aEditData[ MAX_EDIT ]

                 aEditData[ EDIT_KEY    ] := PERSON->SSN
                 aEditData[ EDIT_COLORS ] := "W+/B, N/W"
                 aEditData[ EDIT_VALID  ] := bValid

                 FILE 2
                 ------
                 wNew     ( "Edit" )
                 wProc    ( "Edit", { |a| Edit( a ) } )
                 wCargoPut( "Edit", "EDIT_DATA", aEditData )

                 FILE 3
                 ------
                 local aEdit := wCargoGet( "Edit", "EDIT_DATA" )

                 wOpen( "Edit" )
                 lChanged := eval( wProc( ), aEdit )

See Also: wCargoGet() wCargoDel()

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