Sorry, I should have posted this to the list as well.

Begin forwarded message:

From: Sandy Dunlop <[EMAIL PROTECTED]>
Date: 17 July 2007 22:18:12 BDT
To: Todd Schavey <[EMAIL PROTECTED]>
Subject: Cocoa-Sharp

Hi,
I would like to implement the Growl API for OS X using Mono, a Cocoa-sharp binding for Growl if you want to say it that way. I was looking at the current status of cocoa-sharp and have identified some classes which I'd need to add, and some existing ones with missing methods which I'd need to implement.

The class I'm looking at currently is MutableDictionary. The Java API for Growl calls:

        noteDict.setObjectForKey(new Integer(1), GROWL_NOTIFICATION_STICKY);

where noteDict is an NSMutableDictionary. The Java Cocoa bindings take Java Objects instead of Cocoa Objects, and with Integer inheriting Object, this works just fine. In cocoa-sharp, I have created a MutableDictionary.Set(Cocoa.Object,Cocoa.Object) method.

With cocoa-sharp, I would have to either:
1) Have multiple definitions of Set which take Cocoa.Object and System.Int32 as keys 2) Create a Cocoa.Integer class, which doesn't seem right, although it might fit in with the Java API better 3) Have everything take System.Object instead of Cocoa.Object and pass in a System.Int32 object when needed.

What would you suggest for situations like this?

I would like to contribute my cocoa-sharp additions to the Mono project once I've got it working.
I would also like to contribute growl-sharp.

Thanks,

Sandy

_______________________________________________
Mono-list maillist  -  Mono-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to