On Jan 28, 2012, at 08:19 , Brad Stone wrote:

> I have a shoebox app like iPhoto where the actual filename is irrelevant to 
> the user.   I control the file name.  
> 
> What I'd like to do is just capture the menu items before they're displayed 
> and change the menu titles into something relevant to the user.  In the 
> scheme of things it's a minor way to access the info in my app so if I could 
> eliminate them that would be OK too.  Changing the filename is not an option 
> at this point.

It seems to me you can subclass NSDocumentController, then override 
'noteNewRecentDocument:' to do nothing. Presumably this will keep your filename 
off the "Open Recent" submenu, the "Recent Items" item on the Apple menu, and 
the dock menu. Then you should be able to delete the "Open Recent" item itself, 
and be left with no traces of recent items from your app.

If you wanted to go the extra mile, you could create your own recent-items 
implementation, driven from your 'noteNewRecentDocument:' override, and using 
the 'applicationDockMenu:' application delegate method, with whatever document 
identifiers you want.


_______________________________________________

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

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

Reply via email to