开发者

Am I using BeginSheet right? (MonoMac)

I 开发者_JAVA百科have a feeling that I've either stumbled upon a bug (unlikely) or that I'm just using this function wrong (probably). I'm trying to make a sheet appear on my MainWindow. For some reason though, the sheet window pops up as a regular window without a toolbar and is in no way connected to my MainWindow at all.

Now I'm pretty new to cocoa and MonoMac so you'll have to forgive me, anyways, heres the code:

        TvShowSheetController sheet = new TvShowSheetController ();
        NSApplication.SharedApplication.BeginSheet (sheet.Window, Window);

What am I doing wrong here?


Aha! Setting my sheet's window property "Visible at Launch" to false solved my problem :)


Are you certain that Window is the window you wish to attach the sheet to?

An example from my code using an NSAlert:

alert = new NSAlert ();

alert.AddButton ("OK");
alert.MessageText = "Message";
alert.InformativeText = "Informative.";

alert.BeginSheet (Window, delegate {
    alert.Dispose ();
    alert = null;
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜