Problem: 1174929
Title: (File) this->KindOfFile()
Received: Jul 17 1994 1:19PM
However, all of these given a TFile wich are created by this->DoMakeFile() with the ORIGINAL itsOpenCommand. This does not work if each document has it's own TFile as well (eg differences in resource fork open or not etc.).
Better: Add a KindOfFile() to TApplication and call that from wherever DoMakeFile() is called:
this->DoMakeFile(this->KindOfFile(itsCommandNumber));
We have an application that supports the creation and editing of multiple file types. We've overridden the TApplication member functions that control document and file creation. The problem that we are having is in opening an existing file (Document). ChooseDocument creates a file object using the default creator and type. Thus the wrong document and TFile subclass are created.
How do we support multiple documents in MacApp? We have the needed for our application to create and edit 5 different file types.
Do we need to subclass TFile for each of these situations?
One problem that we see is that an open command is always commandNumber 20 and no where to change it after the user selects the file to open. We can't have 5 different open menu items. We do have different command numbers for creating each of the supported types. ie, cnd_NewTextMessage, cmd_NewFileMessage.
We've overriden the following TApplication member functions to create the proper document and file objects.