Re: Directory navigated to by menu File > Open
Re: Directory navigated to by menu File > Open
- Subject: Re: Directory navigated to by menu File > Open
- From: Uli Kusterer <email@hidden>
- Date: Fri, 16 Jan 2015 14:39:25 +0100
On 16 Jan 2015, at 01:16, Jerry Krinock <email@hidden> wrote:
> So, great, I thought, just override -currentDirectory in the NSDocumentController subclass for TextEdit, and I can make it go wherever I want to.
Have you thought about just setting the directoryURL of the NSOpenPanel?
> But, no. Although my -currentDirectory override is invoked when I click menu > File > Open, any path I return seems to be ignored. If no document is open (no “current document”), it seems to always somehow remember and go to the directory of the last document that was opened, even if this was in a long-app application run. This is the case even if I delete the “recents” file ~/Library/Preferences/com.apple.TextEdit.LSSharedFileList.plist before launching. And no such path is shown when I run the command “defaults com.appleTextEdit”. The system must be remembering this path elsewhere.
It's probably saved as a binary blob of bookmark data (maybe even a security scoped bookmark), not as a plain text path name, for reliability.
-- Uli
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden