> On Feb 20, 2015, at 12:51 PM, Keary Suska <[email protected]> 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 protected]> 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 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