Document::Load

Section: ET++ method description (n)
Updated: automatically Fri Mar 15 14:13:05 1991
Index Return to Main Contents
 

NAME

Document::Load - instance method  

TEMPLATE

fileLoaded = bool Load(char * fileName, bool unique, FileType * fileType)  

SPECIFIERS

public virtual  

DESCRIPTION

If unique is TRUE, then Load first checks whether the file is already opened by another document. If there is such a document Load calls the method DoFileIsAlreadyOpen and returns FALSE if that method also returns FALSE. Otherwise it creates an input stream and passes it to the method DoRead. Finally, if there were no errors during reading, it updates the document attributes instvar isUntitled, instvar isConverted, instvar loadDir and instvar uniqueId. Method is rarely overridden.  

ARGUMENTS

char * fileName

the name of the file to be loaded
bool unique

indicates whether the file should be opened in unique mode. If unique
is FALSE, then the file is opened and loaded in any case. If unique is TRUE, then no other document within the application may have opened the file. If there is such a document and the method DoFileIsAlreadyOpen returns TRUE, then the file is loaded.
FileType * fileType

the type of the file to be loaded
 

RETURN ARGUMENT

bool fileLoaded

It is TRUE
if the file has actually been loaded. It is FALSE if the method DoFileIsAlreadyOpen returned FALSE or there is something wrong with the file itself. The latter is also indicated by an alert.
 

CATEGORIES

input/output, client interface, overrider interface

 

FIRST DEFINITION

class Document  

FILES

implementation:
Document.C

 

KNOWN PROBLEMS

After the file has successfully been loaded PerformCommand(gResetUndo) should be executed instead of deleting the last command manually. See also method Store.


 

Index

NAME
TEMPLATE
SPECIFIERS
DESCRIPTION
ARGUMENTS
RETURN ARGUMENT
CATEGORIES
FIRST DEFINITION
FILES
KNOWN PROBLEMS

This document was created by man2html, using the manual pages.
Time: 00:40:28 GMT, March 30, 2022