[Mono-osx] Conceptual Idea: (Semi)automatic generation of Cocoa# wrapper classes

Andreas Färber andreas.faerber at web.de
Mon Nov 26 13:35:29 EST 2007


Hello,

If you carefully looked at the list archive you would find that we  
once had a code generator for Cocoa#, and it resulted in very ugly  
code. The newer manual version was much, much better but I agree it is  
tedious work and had/has design flaws; I tried addressing some of them  
but that has not been picked up. Also, fundamental differences between  
the two worlds cannot be fully bridged even manually, for instance  
inheritance of events was pretty problematic to implement as I recall.

Whatever you decide to do these days, please keep it to the Cocoa- 
sharp list, there's no need to cross-post. Thank you.

Andreas

Am 26.11.2007 um 17:11 schrieb marc hoffman:

> Stefan, Russell,
>
> Thanx for the pointers. Robert (Gieseke) and i are looking into  
> bridgesupport,
> with the basic idea being that we should be able to generate entire  
> class
> skeletons with stub methods from it (these classes could be partial,  
> so they
> could then be extended with properties, events, helper methods, on  
> top of the
> auto-gen code). We'll be playing with this over the next few days/ 
> weeks.
>
> On first look, it seems that xml files generated by  
> gen_bridge_metadata don't
> really have *all* the info (for one thing, all parameter types seem  
> to be
> defined as "B" (Boolean?), no ancestry information is given, etc.  
> but this could
> be a matter of us not using the tool properly, yet ;). We'll  
> investigate
> further.
>
> Unrelated, i will finish the "method converter" tool i posted a teaser
> screenshot for earlier this month; this should certainly help with  
> adding
> individual method stubs, short term. I'm fighting with some last  
> Cocoa#/Leopard
> issues (i'm hoping Geoff will have time to look at those soon ;) as  
> well as with
> my own time constraints, but i can probably have something usable i  
> can share,
> soonish.
>
> Yours,
>
> marc hoffman
>
> RemObjects Software
> The Infrastructure Company
> http://www.remobjects.com
>
>
>
>
>
>
>
>
>> -----Original Message-----
>> From: Stefan Csomor [mailto:csomor at advancedconcepts.ch]
>> Sent: Sunday, November 11, 2007 12:17 PM
>> To: marc hoffman
>> Cc: mono-osx at lists.ximian.com; cocoa-sharp at lists.ximian.com
>> Subject: Re: [Mono-osx] Conceptual Idea: (Semi)automatic generation  
>> of Cocoa#
>> wrapper classes
>>
>> Hi
>>> Hi,
>>>
>>> this maybe (probably?) has come up before, but i couldn't find any
>>> reference to it, so here it goes:
>>>
>>> As i've found out myself, recently, creating the wrapper classes  
>>> needed
>>> to access the Cocoa objects from managed code is a very tedious and
>>> error prone process, which in tuen explains, of course, why such a  
>>> small
>>> portion of Cocoa is actually exposed, so far. It's mind-numbing
>>> runt-work that no-one wants to do
>> BridgeSupport on Leopard has information on all APIs that can be  
>> used to
>> generate bridging code, it is used for PyObjC and RubyCocoa AFAIK but
>> I'd suggest takeing a closer look:
>>
>> http://trac.macosforge.org/projects/BridgeSupport
>>
>> Best,
>>
>> Stefan Csomor
>>
>
>
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx



More information about the Mono-osx mailing list