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>wcargoget() window function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  WCARGOGET()                                                Window Function
 Purpose..: Retrieve the cargo of a window
-------------------------------------------------------------------------------
 Syntax...: wCargoGet( [<uWin>], <cCargoID> ) --> 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.

 Returns..: uCargo is the cargo stored with the window or
            NIL if an invalid or undefined <cCargoID> is sent.

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

 Source...: WCARGO.PRG
-------------------------------------------------------------------------------
 Example..: . Thes example adds the data used by the window
              procedure Edit( ) to the window's cargo slot. Then
              sends the data to Edit( ) by using wCargoGet().

                 FILE: DataDefs.Prg
                 ------------------
                 local aEditData[ MAX_EDIT ]

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

                 FILE: WindDefs.Prg
                 ------------------
                 wNew     ( "Edit" )
                 wProc    ( "Edit", { |a| Edit( a ) } )
                 wCargoPut( "Edit", "EDIT_DATA", aEditData )

                 FILE Main.Prg
                 -------------
                 local aEdit := wCargoGet( "Edit", "EDIT_DATA" )

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

See Also: wCargoPut() wCargoDel()

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