Re: Open Recent Menu Item
Re: Open Recent Menu Item
- Subject: Re: Open Recent Menu Item
- From: Stéphane Sudre <email@hidden>
- Date: Tue, 13 Jul 2004 18:09:07 +0200
On Jul 13, 2004, at 5:57 PM, Lorenzo wrote:
Hi list,
I would like to know whether I have to manage the sub-menu
"File:Open Recent" by myself adding and removing the items (latest file
names and their URLs or pathnames). Which is the right approach?
Currently when I call the menu item "File:Open" I simply call
runResult = [op runModalForDirectory:NSHomeDirectory() file:nil
types:fileTypes];
if(runResult == NSOKButton){
[self application:nil openFile:[op filename]];
}
So I don't see how the "Open Recent" menu item could memorize the list
of
the most recent file I opened. Any idea?
The lists is saved in the NSDefaults of the application.
So if you provide a CFBundleIdentifier in your Info.plist file and
you're using a Multi-document Cocoa application (using the NSDocument
architecture), it should work with no extra code.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.