|
03-04-2004 06:55
Posted by:
eekaydee
Location:
CA, USA

|
I ran into trouble with saving files.
This is how my save system works:
The user selects "save" or "save as." If ("save as" is selected) or ("save" is selected but there is no existing save file yet), a file is created, the file is left open, and the fileID is kept in a variable.
If the user selects "save as" later and tries to replace the last file, TNT crashes because the file was left open and the file cannot be deleted/replaced. My first idea was to try closing the file right before creating the new file, but if the user cancels, then the last file reference is lost-I can't open files with the fileID.
I guess it's not really that important; the only consequence is that upon selecting "save" after canceling the user must be asked to create the file. However, it would be nice to be able to access the file name of a file referenced by a fileID.
|
|
03-04-2004 19:37
Posted by:
Mark Tully
Location:
TNT HQ, England

|
OK I've logged the crash and put a 'TODO' in for the file name from file id.
Cheers,
Mark
|