So I’ve had a bug report that Parchment couldn’t restore TADS 2 files, and the cause is that the save command results in a data file being saved, but the restore command specifies a save file. Gargoyle 2023.1 also has this issue, although Gargoyle 2019.1 did not. One example file which has this issue is Babel.
The cause seems to be because the TADS 2 askfile
function didn’t always have a filetype argument, as the docs explain:
On some systems, the open-file dialogue will filter the files it displays so that the player only sees files of the particular type being requested. The file_type_code parameter lets you specify the type of file you’re interested in, so that the dialogue can use the appropriate filtering on systems that support this. The file_type_code can be one of the following values, defined in adv.t:
FILE_TYPE_GAME - a game data file (.gam)
FILE_TYPE_SAVE - a saved game (.sav)
FILE_TYPE_LOG - a transcript (log) file
FILE_TYPE_DATA - general data file (used for fopen())
FILE_TYPE_CMD - command input file
FILE_TYPE_TEXT - text file
FILE_TYPE_BIN - binary data file
FILE_TYPE_UNKNOWN - unknown file typeIf you leave out the type code arguments in a call to askfile(), the function will behave as it did with previous versions of TADS. This means that your prompt string must contain the word “save” or “write” in order to show a “save file” dialogue rather than an “open file” dialogue on those systems that differentiate between these dialogue types.
The fact that it used to work in Gargoyle gives me hope we can fix it again, but I have no idea where to look for a solution. Anyone have any ideas?