Re: [Pyobjc-dev] Xcode 3 Python NSView subclass template
Brought to you by:
ronaldoussoren
|
From: s s <li...@in...> - 2008-06-12 12:55:58
|
You have to import your StretchView module into main.py for it to be available. A simple: import StretchView Right after where the comment: # import modules containing classes required to start application and load MainMenu.nib and you should be all set. Remember to do the same with any other Python modules you need to be available. S On Jun 12, 2008, at 8:47 AM, Johannes Scholz wrote: > Pyobjc newbie here. Im trying to draw on a custom view. Here's what > i do: > > Create Cocoa python application > Create Python NSView subclass (I named it StretchView) > > Go to interface builder, add a custom view, change its class to > StretchView in the identify inspector. > > Now when i run the application i get this errors in the debugger > console: > > Unknown class 'StretchView' in nib file, using `(null)' instead. > Unknown class `StretchView' in nib file, using `NSView' instead. > > As a result, the StrechView's drawRect_() method never gets called. > > Doing the same steps, but using Cocoa Application and Objective-C > NSView subclass results in expected behaviour. > > I am using the pyobcj version, that shipped with Leopard. > > Any hints/advices? > > > Johannes Scholz > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://sourceforge.net/services/buy/index.php_______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |