User Tools

Site Tools


init_initialize_the_filemanager_object_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Methods >====== Init (initialize the FileManager object) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page

Init( **//file, error handler //), VIRTUAL**

blk2blue.jpg

Init Initializes the FileManager object.
File The label of the managed file.
error handler The label of an ErrorClass object. See Error Class for more information.

The **Init **method initializes the FileManager object.

Implementation:

The Init method does not initialize some file specific properties (Buffer, FileName, and FileNameValue). You should explicitly initialize these properties after the Init method is called (or within your derived Init method). See the Conceptual Example.

Example:

PROGRAM

** INCLUDE('ABFILE.INC')            !declare FileManager class**

** MAP                              !program map**

** END**

GlobalErrors ErrorClass           !declare GlobalErrors object

Access:Client CLASS(FileManager)  !derive Access:Client object

Init            PROCEDURE         !initialize Access:File object

**              END**

Client    FILE,DRIVER('TOPSPEED'),PRE(CLI),CREATE,BINDABLE,THREAD

IDKey      KEY(CLI:ID),NOCASE,OPT,PRIMARY

Record     RECORD,PRE()

ID          LONG

Name        STRING(20)

StateCode   STRING(2)

**           END**

**          END  **

** CODE**

** GlobalErrors.Init              !initialize the GlobalErrors object**

** Access:Client.Init             !initialize Access:Client object**

** !program code**

** Access:Client.Kill             !shut down the Access:Client object**

** GlobalErrors.Kill              !shut down the GlobalErrors object**

Access:Client.Init  PROCEDURE

** CODE**

** PARENT.Init(Client, GlobalErrors)     !call the base class Init method**

** SELF.FileNameValue = 'Client'         !set the file name**

** SELF.Buffer &= CLI:Record             !point Access:Client to Client buffer**

** SELF.AddKey(CLI:IDKey,'Client ID',1)  !describe the primary key**

See Also:     Buffer, File, FileName, FileNameValue

init_initialize_the_filemanager_object_.htm.txt · Last modified: by 127.0.0.1