osx - NSWindow beginSheet completionHandler not called -


I am showing a sheet in my main window. I present the sheet using this code:

  AddContactWindowController * addContact = [[AddContactWindowController alloc] initWithWindowNibName: @ "AddContactWindow"]; AddContact.currentViewController = myView; Self.addWindowController = addContact; [Self.view.window StartSuccess: addContact.window completionHandler: ^ (NSModalResponse returnCode) {NSLog (@ "Completed handler"); }];  

AddContactWindowController is an NSWindowController subclass within which there is a view controller that has a "close" button inside the view that invites it:

  [[[ Self view] close the window];  

This closes the window, but the completion does not start from the handler. This gives me problems down the road.

Should we complete the NSWNWO sheet in a particular way so that the complete holder can be called successfully? <<< P>

Thanks

Instead of ordering it, you want to call on your window.


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -