Hi,
Is this in a document based application? If so, there is nothing you
need to do. NSDocument already sets up the accessory menu so that the
extension is switched when you change the document type. If you have
built up your own accessory menu, you can call the save panel's
-setRequiredFileType: method with the appropriate extension. Note that
the save panel will automatically add the correct extension to the
file name if it is missing when the user clicks OK (or when the name
has a different extension). However, it will not show the extension
automatically.
No, it is not document-based.
I was already using setRequirtedFileType. But as you write, the
extension is not shown automatically. Furthermore two things confuse:
the first call to the change extension won't actually change it..., the
second yes. Thus when just opening a file with a certain extension,
trying to save it with another file type would try to add a second
extension. Mac warns about that. But the new extension wasn't been shown.
SO my solution is to first remove the file extension of the file. That
way either it gets automatically (not shown, but set correctly) or at a
change it will be shown.
I think maybe not totally straight, but that is how it is set up on the
mac. Now I hope my code works on GNUstep.
Riccardo
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep