I have a document based application. I have overridden dataOfType function to save the appliation. However I am unable to retrieve the application name given by user in NSSavePanel while saving. Is there a way I can get the application name. Also which function is invoked after dataOfType is invoked which can be overridden
Asked
Active
Viewed 123 times
0
-
Wait, did you want the application name or the document name? If the former, what are you planning to do with it? If the latter, do you want the document's previous name (if it has one) or the name under which the user is now saving it? – Peter Hosey Aug 26 '10 at 07:21
-
For the first time, before the document is saved, it has name "Untitled", So after the save operation, this name is still persistent in the dataOfType function. I want to have the name "given by the user in NSSAvePanel" . – Subrat Aug 30 '10 at 07:54
1 Answers
0
Why do you want this information? Apples documentation says you shouldn’t try to access the name or file URL in dataOfType:
or any of the other saving methods, since this is old information. Also cocoa might request your document object to save itself at some temporary location and not to the real path.
If you really want that information though you’d have to override one of the lower-level save methods. The exact order in which they get called is documented.

Sven
- 22,475
- 4
- 52
- 71