Created
November 20, 2012 17:11
Revisions
-
jstedfast created this gist
Nov 20, 2012 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ IntPtr session = NSApplication.SharedApplication.BeginModalSession (window); NSRunResponse result = NSRunResponse.Continues; // Loop until some result other than continues: while (result == NSRunResponse.Continues) { using (var pool = new NSAutoreleasePool ()) { // Run the window modally until there are no events to process: result = (NSRunResponse) NSApplication.SharedApplication.RunModalSession (session); // Give the main loop some time: NSRunLoop.Current.LimitDateForMode (NSRunLoopMode.Default); } } NSApplication.SharedApplication.EndModalSession (session);