Saturday, 10 September 2011

Another question - file names vs. program names

So, work continues. I've been given some nice bug reports these last few days, all fixed. Another way of saying 'expect a 0.9.06 very soon'.

Amongst the issues identified where things relating to malformed saved files (both tx-files and FXB/host chunks). While rectifying this I got thinking on the current state of saving TX-format performance/program files:
Right now, the name of a program/performance is actually fully separated from the file name on disk when saved. The reasons for this is are mainly
  1. File names have character restrictions that are annoying for program names.
  2. The XML is embeddable, i.e does not have to come from file
A perhaps somewhat unintuitive result of this is however that if you create a program, name it Monkey, then save it. TX will now suggest the file name Monkey.txprog.
So far so good. However, if you now rename the program to Elephant and choose 'Save Program' again, the file name will not change. It will still be Monkey.txprog (since the program was previously assigned a file path).
Even 'Save As' will still suggest Monkey.txprog. While logical and following the rule of separation of name and file, it might also be somewhat unintuitive.

How does people feel it should work? I could tie the file name to the program name, so that every time you change the name, the remembered file path is changed as well (as with waves); not a big change. But what should happen if you choose 'Save As'? Should the name of the program change when changing the saved path as well? And by extension: should program names thus be restricted to valid file name characters? (i.e. no ':', '/', '\', '<' etc)

I'm having a hard time deciding whats best here. Suggestions appreciated.
Cheers