Re: [Pyobjc-dev] Problems with Snow Leopard and PyObjC (Possibly Configuration of Templates)
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2009-11-03 07:21:17
|
On 1 Nov, 2009, at 20:53, luis cota wrote: > Need help properly configuring XCode with PyObjC > Installing templates following: http://ioanna.me/2009/09/installing-pyobjc-xcode-templates-in-snow-leopard/ allows creation of projects correctly > When creating a class (Python-Cocoa) that contains IBOutlets and IBActions which are then connected by InterfaceBuilder, Application is not able to locate class at runtime. (See enclosed Fusebox.py class as part of Calculator project in Cocoa Programing for Dummies) > IBOutlets and IBActions need to be added to AppDelegate class to be recognized at runtime? > Breakpoints - is debugging not available with PyObjC? How do you set breakpoints? I can do it just fine with ObjC... > Please help with the above...very confused and not sure how to proceed with XCode and PyObjC. When you add a new Python file to the project you must import it somewhere. In simple project's I tend to add the import statement for classes that are only used in nib files to the 'main.py' file. When you do that problems 2 and 3 go away. XCode does not support debugging of Python code (or rather anything that is not Objective-C/C++). I tend to get by with print statements and sometimes fall back to Python's pdb debugger. The latter has lowlevel command-line interface, it doesn't have a nice GUI. Ronald |