Re: How is "Open Recent >" identified and populated?

2009-08-26 Thread I. Savant
On Aug 26, 2009, at 12:18 AM, Jerry Krinock wrote: On 2009 Aug 25, at 16:43, Jeff Johnson wrote: http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/ So, maybe Interface Builder sends _setMenuName:@"NSRecentDocumentsMenu" to the submenu of its "Open R

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
On 2009 Aug 25, at 16:43, Jeff Johnson wrote: http://lapcatsoftware.com/blog/2007/07/10/working-without-a-nib-part-5-open-recent-menu/ So, maybe Interface Builder sends _setMenuName:@"NSRecentDocumentsMenu" to the submenu of its "Open Recent" menu item. Good work figuring it out, Jeff.

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Jeff Johnson
On Aug 25, 2009, at 6:23 PM, Jerry Krinock wrote: On 2009 Aug 25, at 08:38, I. Savant wrote: On Aug 25, 2009, at 11:33 AM, Jerry Krinock wrote: Is there some magic under the covers? How does Cocoa know which menu item is "Open Recent"? What about its title? :-) No, that can't be, becau

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Kyle Sluder
On Tue, Aug 25, 2009 at 4:23 PM, Jerry Krinock wrote: > Can anyone explain the mystery, or is it indeed "magic" under the covers? It might look for a menu item that's wired to -openDocument:. Or it might be one of those special private NSMenuItem subclasses that I've seen floating around in the s

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
On 2009 Aug 25, at 08:38, I. Savant wrote: On Aug 25, 2009, at 11:33 AM, Jerry Krinock wrote: Is there some magic under the covers? How does Cocoa know which menu item is "Open Recent"? What about its title? :-) No, that can't be, because a title has to be localized. Actually, inste

Re: How is "Open Recent >" identified and populated?

2009-08-25 Thread I. Savant
On Aug 25, 2009, at 11:33 AM, Jerry Krinock wrote: Is there some magic under the covers? How does Cocoa know which menu item is "Open Recent"? What about its title? :-) It's possible it looks for it by name (and also possible it only cares about the first one it finds). In what order

How is "Open Recent >" identified and populated?

2009-08-25 Thread Jerry Krinock
Today I wanted to add a menu item with a submenu similar to "Open Recent". For example, Xcode has: ... Open Recent File -> Open Recent Document -> ... For convenience, I copy/paste/duplicated the "Open Recent" menu item, connected everything, wrote my code, but then found that m