[Prev][Next][Index][Thread]

Re: Objective C bridge



Hello,

  I have been messing around with a Core Foundation dylan library that
works on Darwin/MacOSX. As far as I can tell, Core Foundation is kind of
a cross between the CarbonLib and the Cocoa Foundation Kit. The good
news is that it is a C library, so nothing extraordinary had to be done
to get dylan to work with it, but I only tried a few classes and not the
whole thing like Rob did with Carbon. It might simplify the effort to
get access to the whole Cocoa Foundation by just needing to provide
bridging for those objects and methods not covered by Core Foundation.
Also, I presume that the eventual goal will be to get DUIM and App Kit
working together, or maybe just providing an App Kit library that is
separate from DUIM. Either way, I think it would be a cool project.

Brad

Dustin Voss wrote:
> 
> I've decided to do it, if I can.
> 
> I'm only trying to add minimal Obj C support. It can be improved later,
> but I'm itching for results and don't feel capable of handling the whole
> thing right off. I'm new at this. Here's what I'm aiming for:
> 
> *  I want to be able to instantiate and call on Obj C objects.
> 
> *  I want to be able to create an Obj C stub that fits in the Obj C
> class hierarchy, so I can subclass NSWindowController (for example).
> 
> *  Methods of the Obj C stubs should map to Dylan methods.
> 
> *  Instance variables of the Obj C stub should map to slots of a Dylan
> stub. I considered only supporting methods, to avoid any potential
> garbage collection or reference counting issues with variables, but I
> believe Interface Builder support will require instance variables..
> 
> *  Obj C exceptions should map to Dylan exceptions. This'll be easy.
> 
> *  I'd like to do all this without relying on any pre-processing.
> 
> I've got some ideas, but it's late and I'm tired, so I'll post them
> tomorrow or this weekend. Sorry about the tease! :-)
> 
> In the meantime, I'm looking for information on Gwydion Dylan's support
> for C callback functions. I checked, but couldn't find anything, at
> www.gwydiondylan.org and the Deja Google archives.
> 
> Thanks!
> -- Dustin



References: