Navigation: ABC Library Reference > FileManager > FileManager Properties >====== FileNameValue (constant filename) ====== | |
FileNameValue | STRING(File:MaxFilePath), PROTECTED |
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