On Aug 24, 2015, at 10:41 , Alex Kac <[email protected]> wrote: > > registrationWindowController = [[RegistrationWindow alloc] > initWithWindowNibName:@"RegistrationWindow"]; > > [self.window beginSheet:registrationWindowController.window > completionHandler:^(NSModalResponse returnCode) { > registrationWindowController = nil; > > if (returnCode == 1) > { > [[NSApplication sharedApplication] stopModal]; > [self.window close]; > //[self.window orderOut:nil] > } > }];
At the very least, you should order out the sheet (inside the if block) before doing anything to the window underneath. Also, though probably unrelated to the current behavior, you probably shouldn’t simply nil out the sheet window controller reference like that. Doing so can (and I think always will) leave a dangling invalid pointers from the window — the “windowContoller” and “delegate” properties, for example. You should first set the relevant window properties to ni _______________________________________________ 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]
