views:

20

answers:

1

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

A: 

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