Re: [Pyobjc-dev] Unknown Class `MySimpleClass` in nib file. Using NSObject instead.
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2008-01-24 14:37:54
|
On 18 Jan, 2008, at 12:17, Scotty Delicious wrote: > 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: You have to add 'import MySimpleClass' to the main python file, otherwise your module isn't loaded by the program. Ronald > > 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. > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |