• 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: Close Modal window after sheet ends
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Close Modal window after sheet ends


  • Subject: Re: Close Modal window after sheet ends
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 24 Aug 2015 18:07:15 +0000

On Aug 24, 2015, at 11:00 , Alex Kac <email@hidden> wrote:
>
> As for the relevant window properties - i’m not setting any. What would I set to nil? I’m not setting delegate (you can see 100% of the code below - its literally just getting the window controller, and then setting the window controller to nil when its done.

The window controller itself may set either or both of the “delegate” and “windowController” properties, both of which are unowned (i.e.weak) references and therefore dangerous at the end of the window controller life cycle. If setting the window controller to nil causes it to be deallocated, you could be heading for a crash.

If you explicitly order out the sheet, I think that will (as a side effect) cause sheet window’s “windowController” property to be set to nil for you, but I don’t think the delegate ever gets cleared automatically.

On Aug 24, 2015, at 10:53 , Alex Kac <email@hidden> wrote:
>
> 		if (returnCode == 1)
> 		{
> 			quitMeansCloseWindow = YES;
> 			dispatch_async(dispatch_get_main_queue(), ^{
> 				NSLog(@“Do I get called?”);
> 			});
> 		}

This make it look like there’s something else wrong. I don’t think a modal window should block the main queue.



_______________________________________________

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


References: 
 >Close Modal window after sheet ends (From: Alex Kac <email@hidden>)
 >Re: Close Modal window after sheet ends (From: Alex Kac <email@hidden>)

  • Prev by Date: Re: Close Modal window after sheet ends
  • Next by Date: Presenting VCs as Sheets — Completion Handler?
  • Previous by thread: Re: Close Modal window after sheet ends
  • Next by thread: Re: Close Modal window after sheet ends
  • Index(es):
    • Date
    • Thread