[Mono-list] Cocoa-Sharp and Growl
andreas.faerber at web.de
Tue Jul 17 18:56:48 EDT 2007
Am 17.07.2007 um 23:20 schrieb Sandy Dunlop:
> Sorry, I should have posted this to the list as well.
> Begin forwarded message:
>> [...] 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.
For Cocoa# you need to compare the Objective-C API, not the Java one.
There is no Integer class in Objective-C, use NSValue which should
correspond to Cocoa.Value.
You are aware of the separate cocoa-sharp mailing list?
More information about the Mono-list