NSRecentDocumentRecords - dynamically updating
NSRecentDocumentRecords - dynamically updating
- Subject: NSRecentDocumentRecords - dynamically updating
- From: "James Wettenhall" <email@hidden>
- Date: Wed, 14 Mar 2007 12:22:46 +1100 (EST)
- Importance: Normal
Hi,
I am developing a database application in Cocoa / Objective-C, using
classes derived from NSDocument, NSDocumentController etc. I'm using OS X
10.3.9 and Xcode 1.5.
When authenticating the user for access to the database, my application
also uses the user's credentials (checked against an LDAP directory) to
mount a shared volume. If the shared volume is not mounted before the
application begins, none of the recent files which are on the shared
volume appear in the Recent Files list (even though they are in the PList
file in ~/Library/Preferences/).
How can I update the Recent Files list to include the files on the shared
volume after it has been mounted? (Or override the default Cocoa
behaviour of automatically removing "unreachable" files from the Recent
Files list?)
I am aware of the noteNewRecentDocumentURL method in NSDocumentController,
but it looks like the difficult part will be interpreting the
NSRecentDocumentRecords from the PList file, (unless I manage my own
Recent Documents list in parallel with Cocoa).
I have found a Cocoa / Xcode help item "Resolving Aliases" which looks
potentially useful. But it's not obvious to me how to read in the
NSRecentDocumentRecords data from the PList into a suitable format to use
with this "Resolving Aliases" help item. The NSRecentDocumentRecords
object in the PList file looks like an array of dictionaries, each
containing one object with key "_NSLocator", which is a dictionary
containing one object with key "_NSAlias", which contains some
<data>...</data>.
Thanks in advance,
James
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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