Hello Pythonian gods and goddesses.
I am having some trouble with pyObjC in Leopard/Xcode 3/Interface Builder 3.
I have created a new "Cocoa-Python Applicaion" (over a dozen times now),
added a new python class (sub-class of NSObject) and tried coding my outlets
and actions by hand, instantiating the class in IB3 and then choosing "Write
Class File", I tried starting from IB3 with a generic object, giving it a
name, some outlets and actions, then writing the file. In every case, The
file shows up in Xcode with all the info It seems I should need (see below),
but when I build and run, I get the error:
*Unknown class `MySimpleClass' in nib file, using `NSObject' instead.*
*Could not connect the action ordain: to target of class NSObject*
*Application did finish launching.*
The contents of MySimpleClass.py:
from Foundation import *
from AppKit import *
import objc
class MySimpleClass (NSObject):
mscTextArea = objc.IBOutlet()
mscWindow = objc.IBOutlet()
@objc.IBAction
def mscTest_(self, sender):
mscTextArea.setStringValue_(u"A string Value has been set.")
Please advise.
--
-sD-
Dr. Scotty Delicious, DFPA.
Doctor of Fine Pirate Arts.
|