Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Use of NSAlert is crashing regularly

$
0
0

The following use of an NSAlert is resulting in regular crashing after recent updates to OSX, Xcode, XamarinMac and Xamarin Studio...

NSAlert oAlert = new NSAlert();
// Set the buttons
oAlert.InvokeOnMainThread(delegate
{
    oAlert.AddButton("Yes");
    oAlert.AddButton("No");
});
// Show the message box and capture
oAlert.MessageText = "Title";
oAlert.InformativeText = "The message";
oAlert.AlertStyle = NSAlertStyle.Informational;
var responseAlert = oAlert.RunModal();
//
// <---- Crashes here sometimes (after choosing an option)
//
if (responseAlert == 1000) {
    // Do something
}

It doesn't crash on every display but very regularly!

Any help would be greatly appreciated.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>