voyager
voyager

Reputation: 11

Mac OS X: How to rebuild menu dependences

I have a weird problem. I submitted my app to be published on the app store, but they said me that I have to provide an open recent menu.

I know how to do it programmatically, but it doesn't work in my project because I deleted the File menu previously. I tried to create again this entry, but the instruction:

[[NSDocumentController sharedDocumentController] noteNewRecentDocumentURL:[NSURL fileURLWithPath:@"/pathToMyFolder"]];

does nothing.

I tried to use it in a new project and it works fine, but not in my current project.

I suppose I have lost my internal dependences inside the xml in my nib file.

Anybody knows how to rebuild them after creating the file menu entry?

Thank you.

NOTE: I work with Xcode 4, and my app is not a document based application.

Upvotes: 1

Views: 514

Answers (1)

Darren
Darren

Reputation: 25619

The "Open Recent" menu has a hidden property that allows NSDocumentController to locate it in the main menu.

Xcode's "File >" menu template contains a standard File menu, including a proper Open Recent menu.

Locate the "File >" menu template in the Object Library, add it to your main menu, drag the Open Recent menu into your actual File menu, then delete the File menu template.

Upvotes: 1

Related Questions