[Mono-osx] .exe using Winforms and Monobjc/Cocoa (success)

Matt Emson memsom at interalpha.co.uk
Wed Dec 17 10:28:16 EST 2008


Andrew Brehm wrote:
> I do believe that portability from Windows to Mac OS would be one of the
> most important factors for most people once it has been established that
> Mono and Monobjc can be used to port Windows Forms applications to Cocoa.

Have you looked at Delphi Prism? They are selling Mono dev on Mac OS X 
using no UI builder what so ever :-) One might come out of that product 
though, as they are essentially doing the Parallels running Windows 
accessing IB from the host machine route.

> but do you think there is
> a possibility of creating an auto-converter that would look at Windows Forms
> GUI code and create a NIB file containing the equivalent control

Gorm? I think it will import/export to NIB format. The Windows port is 
very unstable though.

RE: NIB vs XIB : InterfaceBuilder wise - install the XCode 2.x line in 
Leopard. It will give you an InterfaceBuilder pre XIB (iirc). There's an 
intel version.

Conversion: Winforms would need to be a full on parser. WPF is probably 
simpler as the UI is XML based at design time. For WinForms, you could 
write a routine that sucks out the Controls at runtime and deposits 
their public interface. You might also want to look at the WinForms 
designer that Mono has. It crashes a lot, but I managed to use it. You 
might be able to alter the source to do the "sucking" part, You should 
be able to archive/stream the controls straight to an XML file. In XML 
format, you'll be able to apply a transformation, or write a tool to 
interpret and out put a basic XIB? I've never looked at XIB's XML 
format, so I don't know if it's even vaguely close. What we're talking 
about here is probably a XIB "compiler" and would be a lot of work IMO.

For real cross platform - well, WinForms getting more work would 
probably be the answer. Gtk# is working well enough for me though. Spose 
it depends on what you're trying to achieve.

M






More information about the Mono-osx mailing list