It looks like everybody is working on the same thing. I have been porting and improving the gauche-objc bridge. It takes a highly dynamic (read: slow but very interactive) approach, handling everything at runtime. Method calls work fine; but I am currently working on solving a memory allocation problem causing intermittent corruption when referencing instance variables. Once this is solved, I will try to get the method proxies and class definitions working. The advantage is the infrastructure is already written, the disadvantage is that it doesn't really map well to the Chicken FFI and has to be rewritten. Also, there is some missing or incorrect stuff I am fixing as I go along.
It does seem like the original author successfully built a GUI application using Xcode that calls back into methods defined in Scheme. But it will take some more work before I can test that... If you want I can send what I have along, but the code is very messy right now. I will take a look at your code on a non-holiday ;) On 11/24/05, Thomas Chust <[EMAIL PROTECTED]> wrote: > Am 24.11.2005, 07:42 Uhr, schrieb felix winkelmann <[EMAIL PROTECTED]>: > > > [...] > > I've started trying to come up with an Objective-C interface, attached > > my current efforts. Still highly experimental and incomplete. > > Comments are welcome, patches and extensions even more. > > Defining ObjC classes inside Scheme (or Proxy objects to be > > more specific) should be possible, but I'm still pondering how > > to create a NSMethodSignature instance from the forwarded > > selector only... > > [...] > > Hello, > > some weeks ago, I had set out to do ObjC wrappers (for Apple's runtime) as > well, but didn't finish them to my satisfaction. Nevertheless I have some > (hopefully useful) remarks: > * One could get rid of the lazy-ffi dependency (which is currently pre- > venting me from testing the egg) by using the objc_msgSendv family of > functions instead of the objc_msgSend family > * To create an NSMethodSignature you should be able to just use the > - (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector > or > + (NSMethodSignature > *)instanceMethodSignatureForSelector:(SEL)aSelector > methods provided by the NSObject class. > * When I tried to create new ObjC classes from Scheme, which is really > necessary when you want to do any useful GUI Programming for example, > I ran into big trouble as the ObjC runtime functions apparently do > *not* behave as documented in that area. For example, the supplied > usage examples in the Apple Documentation do not work at all. Looking > around on the net, I found out, that the PyObjC developers have been > complaining about the same problem. At that point I decided to give up > the project for lack of time to reverse engineer Apples runtime and to > study PyObjC's guts. > > cu, > Thomas > > > _______________________________________________ > Chicken-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/chicken-users > _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
