To illustrate the issue, I created a simple test project that you can clone from Bitbucket : https://bitbucket.org/vincedev/tesdocapp.git
As you will see, the menu item opens a second (and any number) of windows for the document, but only the first has got the menu. Vince. 2013/5/14 Vincent CARLIER <vince.carl...@gmail.com> > -(IBAction)openDocumentInNewWindow:(id)sender { > AMDocumentWindowController *dwc = [[AMDocumentWindowController alloc] > init]; > [[self document] addWindowController:gpdwc]; > [gpdwc release]; > [gpdwc showWindow:self]; > } > > Typo here, WC reference name is "dwc", not "gpdwc". Sorry. > > > 2013/5/14 Vincent CARLIER <vince.carl...@gmail.com> > >> Hi Quincey, >> >> thank you for the quick answer. >> Unfortunately, no, I didn't forget to add the window controllers using >> the method you mention. >> >> At document creation/opening, a first WC is created (I mean alloc/init), >> added to the document, and released. >> >> As the user request additional windows, the same path is taken, a new WC >> is created, added to the document, and finally receive a showWindow: >> message, that I send to it directly : >> >> -(IBAction)openDocumentInNewWindow:(id)sender { >> AMDocumentWindowController *dwc = [[AMDocumentWindowController alloc] >> init]; >> [[self document] addWindowController:gpdwc]; >> [gpdwc release]; >> [gpdwc showWindow:self]; >> } >> >> This method is defined in the "primary" WC controller class. >> >> No matter what I do, only the first window (that is the window managed by >> the first WC created for the document) gets the menu. >> This is true (at least for me ;) even if subsequent WC aren't the same >> class, and windows are totally different. >> >> I don't know if it makes any difference, I'm running Mac OS X Mountain >> Lion 10.8.3, Xcode 4.6.2. >> >> Vince. >> >> >> 2013/5/14 Quincey Morris <quinceymor...@rivergatesoftware.com> >> >>> On May 14, 2013, at 00:07 , Vincent CARLIER <vince.carl...@gmail.com> >>> wrote: >>> >>> Is there a way to put the menu on other windows too, is there any >>> available >>> API to do that ? >>> >>> >>> All document windows should have the menu. My guess is that you forgot >>> to invoke '-[NSDocument addWindowController:]' on the additional window >>> controllers. >>> >>> >> > _______________________________________________ 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