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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to