Re: Controlling the Open Recent menu
Re: Controlling the Open Recent menu
- Subject: Re: Controlling the Open Recent menu
- From: Kyle Hammond <email@hidden>
- Date: Fri, 5 Sep 2003 00:41:34 -0500
Hi Will,
NSDocumentController handles the Open Recent menu, even in non-document
based applications. See documentation on the following methods.
- (NSArray *)recentDocumentURLs;
- (void)noteNewRecentDocumentURL:(NSURL *)url;
- (void)noteNewRecentDocument:(NSDocument *)document;
- (IBAction)clearRecentDocuments:(id)sender;
You should be able to add your own URL to the menu using
[ [ NSDocumentController sharedDocumentController ]
noteNewRecentDocumentURL:yourURL ];
Putting non-file based URLs into the menu may or may not work. Also,
putting in URLs that your own application doesn't handle may or may not
work. I've never tried it.
Best of luck.
Kyle
On Friday, September 5, 2003, at 12:00 AM,
email@hidden wrote:
Date: Fri, 5 Sep 2003 03:17:45 +0100
Subject: Controlling the Open Recent menu
From: Will Thimbleby <email@hidden>
Hi guys,
Is there anyway you know of being able to use the "Open Recent" menu to
store&open NSURLs that don't point to files, for example web pages or
specific app bookmarks. If not is there a system default that defines
the number of items that should be in the menu, and I'll have to write
it myself.
Cheer -Will
---------------------
Kyle Hammond
email@hidden
<
http://www.snowmintcs.com/> - personal finance software
<
http://www.codeblazer.com/> - multimedia software solutions
_______________________________________________
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.