forums

TNT Basic Forums > Programming Q&A
FIle problem
< Last Thread     Next Thread >
Author
Thread        Post A Reply

03-04-2004 06:55

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

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

Click Here to Email Mark Tully   Find more posts by Mark Tully

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

Cheers,

Mark

03-04-2004 22:13

Posted by:
eekaydee

Location:
CA, USA

Click Here to Email eekaydee   Find more posts by eekaydee

Thanks.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.