Re: [Pyobjc-dev] step by step tutorial - second edition
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-04-02 19:35:42
|
On Wednesday, Apr 2, 2003, at 17:20 Europe/Amsterdam, Jack Jansen wrote: > I've converted my step-by-step tutorial to Restructured Text, fixed a > couple of things people reported and made the directory and file > structure a bit more palatable. If people could have a look and > comment on it (especially on the bits with "XXX editorial note" or > "XXX implementation note") that would be helpful. I've included the > generated HTML so you don't have to read the ReST source (or install > the docutils) to read it. Even though I do most of my hacking in Python 2.3 at the moment (PyObjC and otherwise), I think the tutorial should mention Apple's Python 2.2 with Python 2.3 mentioned in footnotes. I definitely don't want peoply to get the impression that the must install a completely new python interpreter to use PyObjC (*). I'd also include a link to the Objective-C tutorial you're mirroring (http://developer.apple.com/techpubs/macosx/Cocoa/ObjCTutorial/ index.html). Step 4 can also be done as 'nibclassbuilder MainMenu.nib > CurrentConverter.py'. <offtopic>This is installed into /usr/bin when your using Apple's python, should fix this for our installer, with a Python 2.3 framework install it is installed somewhere inside the framework</offtopic> Step 5: - AppKit.NibClassBuilder has recently moved to 'PyObjCTools.NibClassBuilder' (the former will also work in 0.9 but will emit a warning). - Use 'PyObjCTools.AppHelper.runEventloop()' instead of your main function (that should also address your concern about the amount of boilerplate code). Step 8: - The translation of method names is described in `An introduction to PyObjC` (Doc/intro.txt), there is no real reference guide at the moment. - The same document describes how to tell about argument types, but again there is no really detailed documentation about that. Section 'Creating an applet for local use' - This can be done using a buildapp.py script (just like the TableModel example), or not using '--link' in the invocation of bundlebuilder.py. If you include all sources as resources you end up with an applet that you can relocate to ~/Applications. Section 'Creating a fullblown distributable applications' - This is slightly harder at the moment. If your using Apple's python (and therefore targeting OSX 10.2) you just have to copy $PYLIB/site-packages/PyObjC/* and all other site-packages your using into build/CurrencyConverter.app/Resources. - If your using a non-Apple python you're on your own. Bundlebuilder.py seems to have support for standalone applications, but I haven't used this yet. > > <pyobjc-currencyconverter-stepbystep.tgz> > > Shall I check this in? Where? Under what name? Please do, in a subdirectory of either Doc/Tutorials or Examples/Tutorials. The former is probably better, this is mostly about documentation. Many thanks for your work on this tutorial! Ronald > -- > Jack Jansen, <Jac...@cw...>, http://www.cwi.nl/~jack > If I can't dance I don't want to be part of your revolution -- Emma > Goldman > (*) Not that installing Python 2.3 would hurt, Apple's version of Python 2.2 is ancient and Python 2.3 is way better than Python 2.2 even if you don't use the Mac-specific modules. |