User Tools

Site Tools


filenamevalue_constant_filename_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Properties >====== FileNameValue (constant filename) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
FileNameValue STRING(File:MaxFilePath), PROTECTED

blk2blue.jpg

The FileNameValue property contains the constant value specified by the managed file's NAME attribute. The FileNameValue property supplies the managed file's DOS filename for error messages or other display purposes.

The GetName method returns the DOS file name.

Implementation:

You must initialize either the FileNameValue property or the FileName property (but not both) after the Init method is called, or within a derived Init method specific to the managed file. 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               !prototype Access:Client init

             END

Client    FILE,DRIVER('TOPSPEED'),NAME('Client.TPS')!constant filename

Record     RECORD,PRE()

ID          LONG

Name        STRING(20)

          END

         END

CODE

GlobalErrors.Init

Access:Client.Init

!program code

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

CODE

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

SELF.File      &= Client            !point Access:Client to Client file

SELF.FileNameValue = 'Client.TPS'   !set constant DOS filename

See Also:     FileName, GetName, SetName

filenamevalue_constant_filename_.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1