I have an old project which creates several customized file types. These are of cause defined in the File Type set. When I first create a file with the SaveAsDialog, you are able to specify the file type in the setup of the dialog before it is presented. Fine - the file becomes the decided type and gets its icon.
- But when you want to create a file without using a dialog (f.ex. a preference file), how can I specify the file type? It seems that there is no parameters for defining that without using a dialog?
- When I later open the file for writing with a TextOutputStream, the type of the file becomes text and the creator changes to ‘text’ and the icon changes accordingly.
Ealier I was able to set MacType and creator for the folder item after closing the stream, but now the MacType is depricated and I do not find a substitution for changing the file type back to what it originally was.
Is there a workaround or did I get the procedure of working with custom files totally wrong?