home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-09 | 1.4 KB | 42 lines | [TEXT/MPS ] |
- --
- -- © 1994, 1995 Art of Memory Ltd.
- -- All Rights Reserved
- --
- -- This file is supplied as part of the TextPak demonstration. You are only
- -- entitled to use this software to understand how the demonstration works.
- -- You may not duplicate, modify, reproduce or distribute this software in
- -- any form. If you wish to purchase a licence to use this software, please
- -- contact Art of Memory Ltd.
- --
- class GlobalConstantsLoader is ANY;
-
- has
- BitDepth; -- Bit depth of application
- MediaRoot; -- Path to media folder
- TextRepository; -- Path to folder containing text items
- CentralTextFileName; -- Optional name of the single text file in the repository
- FileSeparator; -- PD: Char used to separate folders in path names
-
- -- Load the basic preferences, returning the loaded COLLECTION so
- -- that extra parsing can be done.
- LoadPreferences(prefsFileName)
- prefsFileName is? STRING;
-
- use
- thePreferences;
-
- do
- FileSystem.OpenTextFile(prefsFileName, 'r');
- thePreferences := FileSystem.ReadTextFile();
- FileSystem.CloseTextFile();
-
- self.BitDepth := (thePreferences @ 1).ToInteger();
- self.MediaRoot := thePreferences @ 2;
- self.TextRepository := thePreferences @ 3;
- self.CentralTextFileName := thePreferences @ 4;
-
- self.FileSeparator := FileSystem.GetDirectorySeparator();
-
- result := thePreferences;
- end;
- end;