• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
      • From: Ken Thomases <email@hidden>
    • Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
      • From: Keary Suska <email@hidden>
    • Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
      • From: Steve Mills <email@hidden>
References: 
 >-beginSheet:modalForWindow:modalDelegate:didEndSelector (From: "Raglan T. Tiger" <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: Kyle Sluder <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: "Raglan T. Tiger" <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: Steve Mills <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: "Raglan T. Tiger" <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: Keary Suska <email@hidden>)
 >Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
  • Next by Date: Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
  • Previous by thread: Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
  • Next by thread: Re: -beginSheet:modalForWindow:modalDelegate:didEndSelector
  • Index(es):
    • Date
    • Thread