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

mateyboy john.tear at me.com
Fri Sep 9 12:08:47 EDT 2011


OK, I resolved this using a different method, for anybody who is interested:

InvokeOnMainThread (delegate 
{
    // ...
    // not too sure about 'new IntPtr()' in BeginSheet. I guess it should be
a pointer to alert.Handle?
    alert.BeginSheet(this.Window, this, new Selector
("alertDidEnd:returnCode:contextInfo:"),new IntPtr());
});

I then implemented the selector:

[Export("alertDidEnd:returnCode:contextInfo:")]
public void alertDidEnd(NSAlert alert, int returnCode, NSObject contextInfo)
{
    // get return code here
}

Ta

John

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


More information about the Mono-osx mailing list