On Oct 26, 2005, at 11:27 PM, Manfred Bergmann wrote:
Hmm, how come that I couldn't find any documentation about this?
Because I haven't written any. ;-)
Why haven't I written any? Because I haven't really considered this
side of things - calling Perl from Objective-C - as being "final". It
has been primarily an internal API, and as you've seen from the old
code you looked at, things have changed substantially. It's pretty
well settled down at this point though, so it might well be time to
write those docs.
I guess the Xcode codesence is not working for any Perl classes and
methods, right?
No, it's not. It doesn't know about the Perl debugger either.
And can I somehow get rid of the warning message from gcc that the
object xxx might not respond to method yyy if calling a method of a
Perl class?
You could do what Apple does with delegate methods - declare them in
a category of NSObject:
@interface NSObject (MyPerlClassMethods)
- (id) doFoo:(id)foo;
@end
You don't have to provide an @implementation for them - that's in
Perl. If you declare them in the main @interface, but don't provide
an @implementation, the linker complains. But, with the declarations
in a category, the linker is quiet. That's by design, for situations
like this, where you need to declare an interface for methods that
are not loaded until run time.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org