[Overview][Constants][Types][Classes][Procedures and functions] Reference for unit 'gettext' (#fcl)

TMOFile.Create

Create a new instance of the TMOFileclass.

Declaration

Source position: line 0

public constructor TMOFile.Create(

  const AFilename: String

);

constructor TMOFile.Create(

  AStream: TStream

);

Arguments

AFilename

  

File to open.

Arguments

AStream

  

Contents of a .mo file.

Description

Createcreates a new instance of the MOFileclass. It opens the file AFileNameor the stream AStream. If a stream is provided, it should be seekable.

The whole contents of the file is read into memory during the Createcall. This means that the stream is no longer needed after the Createcall.

Errors

If the named file does not exist, then an exception may be raised. If the file does not contain a valid TMOFileHeaderstructure, then an EMOFileErrorexception is raised.

See also

TMOFile.Destroy

  

Removes the TMOFileinstance from memory