• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Controlling the Open Recent menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Controlling the Open Recent menu
      • From: Will Thimbleby <email@hidden>
  • Prev by Date: Re: Generating Unique ID
  • Next by Date: Re: Hiding an NSControl
  • Previous by thread: Controlling the Open Recent menu
  • Next by thread: Re: Controlling the Open Recent menu
  • Index(es):
    • Date
    • Thread