[Mono-osx] [ANN] objc3-sharp
Jesse Jones
jesjones at mindspring.com
Mon Jun 9 01:48:56 EDT 2008
objc3-sharp is a Mono library that allows you to write Cocoa
applications in any .NET language. It's very easy to use. For example,
you can call native methods like this: "NSObject box =
NSObject.Create("[[NSBox alloc] initWithFrame:{0}]", frame);" and
define new classes like this:
[ExportClass("MyView", "NSView", IVars = "myVar1 myVar2")]
internal sealed class MyView : NSObject
{
// This would be used if you create the view from managed code.
public MyView()
{
}
// This is used if the view was created from native code and will
// be called the first time a managed method is called from native
// code.
private MyView(IntPtr instance) : base(instance)
{
}
[NewMethod("addABox:")]
public void AddABox(NSObject sender)
{
// ...
}
[OverrideMethod("tag")]
public int Tag()
{
return 33;
}
}
It's similar to the Mono objc-sharp library, but faster and way easier
to use. You can download objc3-sharp at <http://code.google.com/p/objc3-sharp/
>.
-- Jesse
More information about the Mono-osx
mailing list