On 16 Jan 2015, at 01:16, Jerry Krinock <je...@ieee.org> 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 (Cocoa-dev@lists.apple.com) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com