User Tools

Site Tools


filename_variable_filename_.htm
Navigation:  ABC Library Reference > FileManager > FileManager Properties >====== FileName (variable filename) C6H0009.jpg ====== Previous pageReturn to chapter overviewNext page
FileName ANY, PROTECTED

blk2blue.jpg

The FileName property is a reference to the variable specified by the managed file's NAME attribute. The FileName property determines which DOS/Windows file is accessed by the FileManager object. The FileName property may also be used for error messages and other display purposes.

The SetName method sets the contents of the filename variable. The GetName method returns the filename.

Implementation:

You must initialize either the FileName property or the FileNameValue 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:

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

Init            PROCEDURE                    !prototype Access:Client init

              END

ClientFileName STRING('Client01.tps')        !variable for filename

Client FILE,DRIVER('TOPSPEED'),NAME(ClientFileName) !file with variable name

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                 !set File property

SELF.FileName  &= ClientFileName         !set variable filename

See Also:     FileNameValue, GetName, SetName

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