[Pyobjc-dev] Re: Using python classes in objc...
Brought to you by:
ronaldoussoren
From: Jiva D. <ji...@de...> - 2004-03-10 17:15:36
|
Correction: the url I sent should have been: http://cocoa.mamasam.com/COCOADEV/2004/01/1/81225.php On Mar 10, 2004, at 10:01 AM, Jiva DeVoe wrote: > I know I have asked this question before, and I even thought I knew > the answer, but apparently I still don't "get it." > > If I want to use a python class in my objective-c code, I know I can > use it via a nib etc. But what if I want to use it right in my Obj-C > code itself? ie: > > -(void)objCMethod > { > PythonClass pythonClass = [[PythonClass alloc] init]; > [pythonClass somePythonMethod]; > } > > I know, runtime is easy, but at compile time, I get an undefined > symbol for the python class (unless I compile with zero link, which I > don't want to do). > > I understand the basics of the naming and whatnot. It's just the > undefined symbol I can't seem to fix. > > How do I get around this problem? BBum has mentioned using a factory > method in an abstract superclass. Ok, that's fine, but even then, the > factory method still has to instantiate the python class. How does it > do so without linking the python code? > > As shown here (http://cocoa.mamasam.com/COCOADEV/2004/01/1/81235.php) > I am not alone in this question. Anyone have some example code? If > not example code, I'll take any amount of tips or help! > > -- > Jiva DeVoe > jiva at devoesquared.com > http://www.devoesquared.com > > -- Jiva DeVoe jiva at devoesquared.com http://www.devoesquared.com |