The IDL_Savefile::Init function method initializes the savefile object. The SAVE file associated with the object is opened and scanned to construct an internal data structure representing the contents. The SAVE file remains open until the savefile object is destroyed - the user is not allowed to use the CLOSE procedure to close the SAVE file.
Obj = OBJ_NEW('IDL_Savefile' [, Filename ] [, FILENAME=string] [, /RELAXED_STRUCTURE_ASSIGNMENT])
Result = Obj->IDL_Savefile::Init() (Only in subclass' Init method.)
When this method is called indirectly, as part of the call to the OBJ_NEW function, the return value is an object reference to the newly-created object.
When called directly within a subclass Init method, the return value is 1 (one) if initialization was successful, or 0 (zero) otherwise.
A scalar string that contains the path name of the SAVE file from which information or data is to be recovered. If Filename is not present but the FILENAME keyword is specified, the keyword value is used. If neither the argument or the keyword is present, the file
idlsave.dat in IDL's current working directory is used.
Set this keyword equal to a scalar string that contains the path name of the SAVE file from which information or data is to be recovered.
Normally, the IDL_Savefile::Restore method is unable to restore a structure variable if the definition of its type has changed since the SAVE file was written. This commonly occurs when objects are saved and the class structures of the objects change before they are restored in another IDL session. In such cases, IDL_Savefile::Restore issues an error and does not restore the item.
Set the RELAXED_STRUCTURE_ASSIGNMENT keyword when creating a savefile object to cause the IDL_Savefile::Restore method to restore such incompatible values using "relaxed structure assignment," in which all possible data are restored using a field-by-field copy.
See the description of the STRUCT_ASSIGN procedure for additional details. Relaxed Structure Assignment provides a more in-depth discussion of the structure-definition process.