[Mono-osx] Creating NSWindow programmatically in Mono using MonoMac.dll ref.

pjsirvere pjsirvere at gmail.com
Fri May 3 03:04:42 UTC 2013


I have an application that is written in c# and I am now porting to the mac.
This is working using Mono.

I am using a Mac Mini Mid 2011 2.3 GHz Intel Core i5
osx 10.8.2  
IDE  
Xamarin Studio  
Version 4.0.4 (build 2)  
Installation UUID: 0df3cd36-37ed-4451-8ca7-370ec8220237  
Mono 2.10.11 (mono-2-10/2baeee2)  
GTK 2.24.14  
GTK# (2.12.0.0)  
Package version: 210110000  
Apple Developer Tools  
Xcode 4.6 (2066)  
Build 4H127  

I need a simple web view for my Gui as we are changing to a html5 Frontend.
Mono does not have a web browser for Mac that can be used. 
MonoMac does so I am trying to add the MonoMac.dll to a mono project.
    
        lock(typeof(Frontend2))
	{
	  NSApplication.Init();
	}
        RectangleF rec = new RectangleF(0,0,500,500);
	WebView web = new WebView(rec, "A", "B");

  	NSWindow win = new NSWindow(rec, NSWindowStyle.Resizable,          
NSBackingStore.Buffered,false);
        NSApplication.SharedApplication.AddWindowsItem(win, "Hello",false);

The application runs and compiles unfortunately I am unable to make the
NSWindow appear.  
I understand in a MonoMac project there is a xib file and things.  
So I was just wondering if anyone knew a way to make it work or if it is
even possible to do what I am doing.  
Thank you for any feed back.  
Paul 



--
View this message in context: http://mono.1490590.n4.nabble.com/Creating-NSWindow-programmatically-in-Mono-using-MonoMac-dll-ref-tp4659577.html
Sent from the Mono - OSX mailing list archive at Nabble.com.


More information about the Mono-osx mailing list