Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple "Open Recent" menus;



Hello all,

I have a weird issue with Open Recent and NSDocumentController.

You can easily see the problem by performing a simple test. If you have an app that has an Open Recent menu item in the MainMenu.nib, open IB and copy/paste it in the File menu. So now your File menu should have 2 Open Recent menus (and they both should have the "Open Recent Menu" radio checked on the IB Attributes inspector).

Now when you run your app, you will see that only the first one gets populated with your recent docs. The second one only has the Clear menu item. However, they are both hooked up to the same document controller, since if you Clear one, the other one responds appropriately.


So yah, that example is a bit out there, and its not my real situation (no one really wants to Open Recents right next to each other), but it is a quick way to demonstrate the problem. Anyone know what is going on with this and why only the first menu shows the list of recent docs as defined in the NSRecentDocumentRecords key in the prefs file? Does the NSDocumentController only have a reference to one NSMenu that it manages? If so, can I change that reference somehow?


Note that this also is a problem if you manually add an Open Recent menu item through the instructions in http://lapcatsoftware.com/blog/ 2007/07/10/working-without-a-nib-part-5-open-recent-menu.

 - Matt
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.