[Mono-osx] Getting the return code from a NSAlert Sheet

mateyboy john.tear at me.com
Fri Sep 9 11:04:04 EDT 2011


Hi

I am not too sure how I can get the returnCode from the following:

InvokeOnMainThread (delegate 
{
  NSAlert alert = new NSAlert();
  alert.AddButton("Yes");
  alert.AddButton("No");
  alert.MessageText = "Are you sure you want to delete " +
aToken.Description +"?";
  alert.InformativeText = "This action cannot be undone.";
  alert.AlertStyle = NSAlertStyle.Warning;
  alert.BeginSheet(this.Window, delegate
  {
    // need to get return code here

    // This is the selector in obj-c ???
    // - (void) alertDidEnd:(NSAlert *)alert 
    // returnCode:(NSInteger)returnCode 
    // contextInfo:(void *)contextInfo;
  });
});

Any help/pointers would be appreciated.

Thanks

John

--
View this message in context: http://mono.1490590.n4.nabble.com/Getting-the-return-code-from-a-NSAlert-Sheet-tp3801957p3801957.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list