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 <[email protected]>

> On May 14, 2013, at 00:07 , Vincent CARLIER <[email protected]>
> 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 ([email protected])

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 [email protected]

Reply via email to