[Mono-osx] Instantiating window with no controller?

Duane Wandless duane at wandless.net
Sat Aug 6 19:38:49 EDT 2011


You may find some answers looking at this library:
https://github.com/Clancey/MonoMac.Windows.Form
Or even be able to use the library.

Best of luck.
Duane

On Sat, Aug 6, 2011 at 6:43 PM, Eric J. M. Smith <eric at tarkvara.org> wrote:

> Greetings,
>
> I'm just finding my way in MonoMac, and noticed that one of the template
> types in MonoDevelop is "Cocoa Window" (as distinct from "Cocoa Window with
> Controller").  We have some .NET forms that we want to port, and thought
> "Cocoa Window" would be the thing to use.
>
> But if you have a controllerless nib, how do you actually instantiate it?
>  I thought the following might work, but myController.Window is always null.
>
> NSWindowController myController = new NSWindowController("MyWindowNib");
> MyWindow window = myController.Window;
> NSApplication.SharedApplication.RunModalForWindow(window);
>
>
> >From a practical standpoint, it's not a big problem, since we can always
> use "Cocoa Window with Controller".  I'm just curious how one would actually
> instantiate a window from nib created using the "Cocoa Window" template.
>
> Thanks,
>
> Eric Smith
> Tarkvara Design Inc.
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110806/198d062c/attachment.html 


More information about the Mono-osx mailing list