D/Objective-C Bridge

Anders F Björklund afb at algonet.se
Tue Sep 18 06:27:58 PDT 2007


Michel Fortin wrote:

>> The way it was originally planned for Carbon was with auto-conversion.
>> So that you'd download a program you could run on "your own" headers...
>> Possibly something like SWIG, with auto-generation plus some patches.
> 
> I'm not sure about autoconversion. What's interesting when writing 
> manually the wrappers is that you can shorten the method names. Things 
> wouldn't be too bad for methods like this one:
> 
>     [dict setObject:object forKey:key];
> <=>
>     dict.setObjectForKey(object, key);
> 
> although I think binding it to opIndexAssign (like I did) makes more sense.

Surely opIndexAssign can just call the traditional function name, no ?
(i.e. have opIndex and opIndexAssign call objectForKey/setObjectForKey)

The Carbon conversion was scrapped in favor of wxWidgets, by the way.
Much easier to #include <Carbon/Carbon.h>, and is also cross-platform.

So another dead project: http://dsource.org/forums/viewforum.php?f=68

--anders



More information about the Digitalmars-d-announce mailing list