VB Project Template for Monobjc in MonoDevelop?

Posted by Ira Rainey on Stack Overflow See other posts from Stack Overflow or by Ira Rainey
Published on 2010-04-03T10:17:08Z Indexed on 2010/04/03 10:23 UTC
Read the original article Hit count: 434

Filed under:
|
|
|

After installing Monobjc and playing around with the Monobjc Application Project under C# in MonoDevelop, I noticed that there is only an empty Monobjc project under the VB section.

Obviously this template adds all the correct references but doesn't add the basic files for the application to run. I've tried creating a class with:

Imports System
Imports Monobjc
Imports Monobjc.Cocoa

Class Application

    Public Sub Main(Byval args() As String) 

        ObjectiveCRuntime.LoadFramework("Cocoa")
        ObjectiveCRuntime.Initialize()

    End Sub

End Class

Obviously I'm not loading the NIB there either, as I haven't added that in either, but if I try to build this I get:

/Source/VB_Sample/VB_Sample/<MyGenerator>(1,1): Error VBNC30420: Could not find a 'Sub Main' in ''. (VBNC30420) (VB_Sample)

Where should I be putting the Sub Main?

Also if I add in a xib file from IB, how do I generate the designer code for the partial AppDelegate class?

Any help would be appreciated.

© Stack Overflow or respective owner

Related posts about monodevelop

Related posts about mono