How can documentForFileName be depricated?
How can documentForFileName be depricated?
- Subject: How can documentForFileName be depricated?
- From: James Bucanek <email@hidden>
- Date: Wed, 8 Feb 2006 10:50:01 -0700
Greetings,
I was in the process of adding a utility function to my File menu that would repair a document file (the catch here is that the document might be so badly damaged that you can't open it). The logic follows the same one for opening files:
Use NSOpenPanel to get the document name
Search to see if selected document is already open in a window
Start repair procedure
For step #2 I was going to call NSDocumentController's documentForFileName. But it says that it's deprecated! That's fine, up to a point. I can imagine that the assumption that all documents are associated with a file path might be unwarranted. I can also easily role my own method for determining if a given document is already opened in a window somewhere.
But the problem I have is in wondering how the standard Open... logic is going to work should documentForFileName go away? The standard behavior of the Open... command requires that it identify an already opened document giving a path to a file. How could the framework continue to work without documentForFileName?
Am I missing some alternate/modern/preferred method of accomplishing this?
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden