• 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: Open Recent Menu
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open Recent Menu


  • Subject: Re: Open Recent Menu
  • From: Graham Cox <email@hidden>
  • Date: Tue, 10 Jul 2012 11:25:18 +1000

On 10/07/2012, at 4:34 AM, koko wrote:

> In some situations, it is worthwhile to subclass NSDocumentController in non-NSDocument-based applications to get some of its features. For example, the NSDocumentController management of the Open Recent menu is useful in applications that don’t use subclasses of NSDocument.
>
> I have subclassed NSDocumentController.
>
> I have the Menu structure for there Open Recent menu.
>
> I use -noteNewRecentDocumentURL:
>
> Yet, I get no entries in the Menu.
>
> Where should I look?




Emphasis on:

>> useful in applications that ____don’t____ use subclasses of NSDocument


Why are you doing this?

This situation doesn't apply in your case. Just leave things as they are and the recent items menu will work normally.

In any case the way you are creating your NSDocumentController is completely wrong. It must be done extremely early on in the launch of an app since it's a singleton instance that has to be available for all document objects that get created from the very first.

The default NSDocumentController will work properly if you let it.


--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Open Recent Menu
      • From: koko <email@hidden>
References: 
 >Open Recent Menu (From: koko <email@hidden>)

  • Prev by Date: Re: turning app into background app
  • Next by Date: Re: One more try - NSCollectionView multi-selection problem..
  • Previous by thread: Re: Open Recent Menu
  • Next by thread: Re: Open Recent Menu
  • Index(es):
    • Date
    • Thread