Re: Document Window Versions Drop-down Menu
Re: Document Window Versions Drop-down Menu
- Subject: Re: Document Window Versions Drop-down Menu
- From: Vincent CARLIER <email@hidden>
- Date: Tue, 14 May 2013 10:59:38 +0200
-(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 <email@hidden>
> 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@hidden>
>
>> On May 14, 2013, at 00:07 , Vincent CARLIER <email@hidden>
>> 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@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:
This email sent to email@hidden