Re: [Pyobjc-dev] Tutorials for PyObjC 2, Leopard and Interface Builder 3
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2007-12-07 11:15:12
|
On 6 Dec, 2007, at 17:15, Richard Cooper wrote: > Hi there. > > I'm interested in learning my way around PyObjC on Leopard but all of > the tutorials I can find seem to be for older versions of PyObjC, > Xcode and Interface Builder. Does anyone know of any good tutorials > covering the versions of tools installed on Leopard? Interface Builder > in particular has completely changed. The fact that http://pyobjc.sourceforge.net/ > doesn't even acknowledge the existence of PyObjC 2 makes me think I > must be missing a website somewhere. You haven't missed anything, the documentation for PyObjC2 is not online yet due to lack of time on part. > > > One of the things I'm trying to understand is the best way to layout > and build a PyObjC application. Most of the tutorials I've found on > the web and in /Developer/Examples/Python/PyObjC/ use things like > "python setup.py py2app" and "NibClassBuilder.AutoBaseClass" but if > you use one of the Cocoa-Python templates in XCode you get a very > different looking project. If I had to guess it seems that the > examples show the old way of doing things and the Xcode template is > the new way now that Apple have embraced PyObjC but really I've no > idea. Is one of these approaches recommended over the other? If not > then what are the pros and cons of each approach? I still use py2app. The Xcode templates are supported by Apple and are the best way to integrate with Xcode at the moment. py2app allows you to build applications without having Xcode installed. The AutoBaseClass stuff is deprecated in PyObjC 2, I haven't eradicated it from all examples yet. The main reasons for deprecation are that (1) it it no longer needed given Xcode/IB's support for PyObjC code and (2) the ".xib" files in Xcode3 use a completely new file format that the AutoBaseClass code doesn't grok. If you're new to PyObjC but are confortable with Xcode I'd use the Xcode templates. Ronald |