Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
- Subject: Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
- From: "Raglan T. Tiger" <email@hidden>
- Date: Fri, 20 Feb 2015 13:34:29 -0700
> On Feb 20, 2015, at 12:51 PM, Keary Suska <email@hidden> wrote:
>
> Does [NSApp mainWindow] return a non-nil value at the point the code is invoked?
> On Feb 20, 2015, at 12:57 PM, Steve Mills <email@hidden> wrote:
>
> Or is it pointing to the same window that you're trying to make a sheet?
2015-02-20 13:17:57.666 [5613:177188] aboutWindowController <ETAboutWindowController: 0x6000000e4600>
2015-02-20 13:17:57.666 [5613:177188] aboutWindowController window <NSWindow: 0x6000001e9500>
2015-02-20 13:17:57.666 [5613:177188] mainWindow window <NSWindow: 0x6000001e9500>
You can see that as Steve asked the main window and sheet window are the same.
So, I added an outlet of the app window and get:
2015-02-20 13:28:21.563 [5792:181060] aboutWindowController <ETAboutWindowController: 0x6100000e1b00>
2015-02-20 13:28:21.563 [5792:181060] aboutWindowController window <NSWindow: 0x6180001edb00>
2015-02-20 13:28:21.563 [5792:181060] appWindow <NSWindow: 0x6080001e0400>
Which on its face looks good ... but the sheet still displays as a window with no title and does not slide down from the app window.
ETAboutWindowController *aboutWindowController = [[ETAboutWindowController alloc] initWithWindowNibName:@"ETAboutWindowController"];
NSWindow *aboutWindow = [aboutWindowController window];
NSLog(@"aboutWindowController %@",aboutWindowController);
NSLog(@"aboutWindowController window %@",aboutWindow);
NSLog(@"appWindow %@",m_window);
[NSApp beginSheet:aboutWindow modalForWindow:m_window modalDelegate:nil didEndSelector:nil contextInfo:nil];
This just seems too ridiculous for something that has been around forever and that I have successfully implemented in the past.
-rags
_______________________________________________
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