On Nov 17, 2004, at 5:10 AM, Tom Insam wrote:
> Woah, CVS head is scary. Things are actually _happening_ in there. Wow.
Dunno whether I should be happy that you noticed, or sad that you're
Anyway, you're right - CVS head is not for the faint of heart right
now. It's at the "it builds clean on my machine, but who knows if it
really works" stage. I hadn't planned on mentioning it until I'd sorted
things out a little better and done some real testing, but since the
cat's more or less out of the bag, here's what's new:
The framework and Perl module are built separately now. The module is
the usual MakeMaker procedure, and links to the framework. This will
allow standalone scripts to use CB, as well as .app bundles. GUI apps
still require a .app bundle - that's a requirement of Cocoa, not CB.
(I've done some experiments though, that show that the "binary" inside
an .app bundle doesn't actually need to be a binary - a script will
Type conversions (id to SV*, etc.) for non-OO functions are now in a
traditional XS typemap. I also plan to extend this typemap to include
Core Foundation types, using CB's conversion functions and typecasting
to take advantage of Apple's "toll-free bridging" of many CF & Cocoa
There's code in place to register Perl classes with the Objective-C
runtime. The registration code builds cleanly and runs without
crashing, but creating instances of Perl classes and calling their
methods from Objective-C is entirely untested at this point.
Code is in place to use ffcall to build up an argument list and call
objc_msgSend() to call native methods, instead of NSInvocation. That
should be a bit faster, as NSInvocation is basically just a high-level
OO wrapper around the low-level function anyway. But more importantly
it's needed to support subclassing - there's no way to use NSInvocation
in a Perl subclass that wants to call SUPER::whatever(), where
whatever() is a native method that's been overriden. But there *is* a
low-level function for doing that. I've run some successful tests on
this, creating native objects and calling their methods.