Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

WTable:Init() Method
Construct a table object
------------------------------------------------------------------------------

Syntax
WTable{ <oParent>, <cName>, [ <lShared> ] , [ <lNew> ] , [ <lReadOnly> ] ,
        [ <cRDD> ] }   -->   SELF

Arguments
<oParent> is the parent (owner) of the table.  If you will be
using the ReDo() mechanism, the parent must have a ReDo()
method.

<cName> is the file name of the table to be opened.

<lShared> specifies whether the file is to be opened SHARED
(default .T.).

<lNew> specifies whether the current (.F.) or a new (.T.) work
area is to be used (default .T.).

<lReadOnly> specifies whether the file is to be opened read
only (default .F.).

<cRDD> specifies the RDD name.  This defaults to the value of
DBSetDriver().

Returns
SELF.

Description
This method initialises the table object, sets the Alias and
Area properties, and opens the file containing the table's
data.  The file is added to the files that can take part in
the ReDo() mechanism.

Example
// From SOURCE\OO\USERSRES\USERSMDI.PRG:

CLASS UsersDialog INHERIT WDialog
     PROTECT oUsers AS OBJECT // AS WTable
     // . . .
ENDCLASS

METHOD OnInitDialog() CLASS UsersDialog
::oUsers = WTable{self, "users"}
(::oUsers:Area)->( dbGoTop() )
// . . .


See Also: WTable:Axit() WTable:ReDo()

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