• 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
disabling "Open Recent" menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

disabling "Open Recent" menu items


  • Subject: disabling "Open Recent" menu items
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 6 Oct 2009 15:56:21 -0700

i need to disable opening any files via the "Open Recent" menu items until the user has specified some information that i save in my app's prefs. this situation can occur if the user has deliberately or accidentally deleted the prefs. now, i can (and do) override -[NSDocumentController openDocumentWithContentsOfURL:display:error:] which takes care of the situation in which the user double clicks a file in the finder.

however, in addition to this, i would like to dim/disable any files that happen to be in the "Open Recents" file (sub-)menu. for the time being, i'm overriding -[NSDocumentController validateMenuItem:] and seeing if the action for the passed in menuItem is _openRecentDocument:. but since this is an undocumented api, i prefer to accomplish this in a more "legal" manner, but i don't know what that is.

can anyone suggest a "legal" way to disable the items in the "Open Recent" menu?

thanx,
ken

_______________________________________________

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


  • Prev by Date: Re: [Performance issue] Resizing an alert sheet => blinks
  • Next by Date: Re: [Performance issue] Resizing an alert sheet => blinks
  • Previous by thread: Re: Constructive Criticism
  • Next by thread: class variables
  • Index(es):
    • Date
    • Thread