Commits

Ronald Oussoren committed 584a514

- HTML updates
- Fix buglet: autoGIL is part of core python in Python 2.3, explicitly test
for py 2.2 before importing autoGIL because Py2.3 + autoGIL + PyObjC == BOOM

  • Participants
  • Parent commits 8cd6af6
  • Branches pyobjc-ancient

Comments (0)

Files changed (7)

File Doc/C-API.html

 more convenient.</p>
 <p>The C API is defined in <code><span>pyobjc-api.h</span></code>. This file is currently not installed
 because the API is not entirely stable. This is the only file that can
-be included from outside of the 'Modules/objc' directory, future versions of
+be included from outside of the 'Modules/objc' directory; future versions of
 the bridge may use additional linker flags to make sure that the module doesn't
 export symbols other than the module init function.</p>
 <p>The easiest way to wrap global functions and constants is by using the scripts
-in Scripts/CodeGenerators. This script is unsupported and might not work on
-anything but the Apple headers, but if it works it will save you a lot of work.</p>
+in Scripts/CodeGenerators. These scripts are unsupported and might not work on
+anything but the Apple headers, but if they work it will save you a lot of work.</p>
 <h2><a name="limititations">Limititations</a></h2>
 <p>An important limitation of the current C API is that you can only use the API
 from one C file in the implementation of an extension module. This limitation
 <pre>
 static int PyObjC_ImportAPI(PyObject* calling_module)
 </pre>
-<p>This module will return 0 if loading the module was successfull, and -1
+<p>This module will return 0 if loading the module was successful, and -1
 otherwise. Reasons for failure include: not being able to locate the module
 and API version conflicts.</p>
 <p>Loading the API will make it impossible to unload the <code><span>calling_module</span></code>.</p>

File Doc/PyObjCTools.html

 <body>
 <h2>PyObjCTools: The PyObjC Toolbox</h2>
 <h3 id="introduction">Introduction</h3>
-<p>The package <code><span>PyObjCTools</span></code> contains a number of (basicly unrelated) modules
-with usefull functionality. These have been placed inside a module to avoid
+<p>The package <code><span>PyObjCTools</span></code> contains a number of (basically unrelated) modules
+with useful functionality. These have been placed inside a module to avoid
 cluttering the global namespace.</p>
 <p>The rest of this document provides documentation for these modules, but lets
 start with a short overview.</p>
 <ul>
 <li><code><span>PyObjCTools.Signals.py</span></code></li>
 </ul>
-<p>Module that tries to print usefull information when the program gets a fatal
+<p>Module that tries to print useful information when the program gets a fatal
 exception. This module should only be used during development.</p>
 <h2><a name="pyobjctools-apphelper"><code><span>PyObjCTools.AppHelper</span></code></a></h2>
 <p>This module exports two functions that are usefull when working with the
 </li>
 <li><code><span>setKeyPath(object,</span> <span>keypath,</span> <span>value)</span> <span>-&gt;</span> <span>None</span></code><p>The same as <code><span>setKey</span></code>, but now using a key path. A key path is a sequence
 of keys seperated by dots. The <code><span>getKey</span></code> function is used to traverse 
-the path upto the last item, and then <code><span>setKey</span></code> is used to change the value.</p>
+the path up to the last item, and then <code><span>setKey</span></code> is used to change the value.</p>
 </li>
 </ul>
 <h2><a name="pyobjctools-nibclassbuilder">PyObjCTools.NibClassBuilder</a></h2>
 <h3><a name="the-command-line-tool">The command line tool</a></h3>
 <p>When run from the command line, this module invokes a simple command
 line program, which you feed paths to nibs. This will print a Python
-template for all classes defined in the nib(s). For more doco, see
-the commandline_doc variable, or simply run the program wothout
+template for all classes defined in the nib(s). For more documentation,
+see the commandline_doc variable, or simply run the program without
 arguments. It also contains a simple test program.</p>
 <h2><a name="pyobjctools-signals">PyObjCTools.Signals</a></h2>
-<p>This module provides two functions that can be usefull while investigating
+<p>This module provides two functions that can be useful while investigating
 random crashes of a PyObjC program. These crashes are often caused by 
 Objective-C style weak references or incorrectly implemented protocols.</p>
 <ul>
 </li>
 </ul>
 <p>This module is not designed to provide fine grained control over signal 
-handling. Nor is it intended to be terribly robust. It may give usefull
+handling. Nor is it intended to be terribly robust. It may give useful
 information when your program gets unexpected signals, but it might just
 as easily cause a crash when such a signal gets in.</p>
 <h2><a name="pyobjctools-pluginbuilder">PyObjCTools.pluginbuilder</a></h2>
 <p>This module defines one class to build python based plugin bundles for MacOS X.
 Examples of plugin bundles include PreferencePanes and InterfaceBuilder 
 palletes.</p>
-<p>The PluginBuilder class is instantated with a number of keyword arguments and
-have a <code><span>build()</span></code> method that will do all the work.</p>
+<p>The PluginBuilder class is instantiated with a number of keyword arguments and
+has a <code><span>build()</span></code> method that will do all the work.</p>
 <p>XXX: Add documentation about the constructor arguments</p>
 <p>The module contains a main program that can be used in two ways:</p>
 <pre>

File Doc/api-notes-macosx.html

 </li>
 <li><a href="#foundation-framework" id="id21" name="id21">Foundation framework</a><ul>
 <li><a href="#class-nsarray" id="id22" name="id22">Class <code><span>NSArray</span></code></a></li>
-<li><a href="#class-nsbundle" id="id23" name="id23">Class <code><span>NSBundle</span></code></a></li>
-<li><a href="#class-nscoder" id="id24" name="id24">Class <code><span>NSCoder</span></code></a></li>
-<li><a href="#class-nsdata" id="id25" name="id25">Class <code><span>NSData</span></code></a></li>
-<li><a href="#class-nsdecimalnumber-and-the-nsdecimal-type" id="id26" name="id26">Class <code><span>NSDecimalNumber</span></code> and the <code><span>NSDecimal</span></code> type</a></li>
-<li><a href="#class-nsdictionary" id="id27" name="id27">Class <code><span>NSDictionary</span></code></a></li>
-<li><a href="#class-nsfault" id="id28" name="id28">Class <code><span>NSFault</span></code></a></li>
-<li><a href="#class-nsindexset" id="id29" name="id29">Class <code><span>NSIndexSet</span></code></a></li>
-<li><a href="#class-nsinvocation" id="id30" name="id30">Class <code><span>NSInvocation</span></code></a></li>
-<li><a href="#class-nsmutablearray" id="id31" name="id31">Class <code><span>NSMutableArray</span></code></a></li>
-<li><a href="#class-nsnetservice" id="id32" name="id32">Class <code><span>NSNetService</span></code></a></li>
-<li><a href="#class-nsobject" id="id33" name="id33">Class <code><span>NSObject</span></code></a></li>
-<li><a href="#class-nsscriptobjectspecifier" id="id34" name="id34">Class <code><span>NSScriptObjectSpecifier</span></code></a></li>
-<li><a href="#class-nsset" id="id35" name="id35">Class <code><span>NSSet</span></code></a></li>
-<li><a href="#class-nsstring" id="id36" name="id36">Class <code><span>NSString</span></code></a></li>
-<li><a href="#class-nsthread" id="id37" name="id37">class <code><span>NSThread</span></code></a></li>
+<li><a href="#class-nsautoreleasepool" id="id23" name="id23">Class <code><span>NSAutoreleasePool</span></code></a></li>
+<li><a href="#class-nsbundle" id="id24" name="id24">Class <code><span>NSBundle</span></code></a></li>
+<li><a href="#class-nscoder" id="id25" name="id25">Class <code><span>NSCoder</span></code></a></li>
+<li><a href="#class-nsdata" id="id26" name="id26">Class <code><span>NSData</span></code></a></li>
+<li><a href="#class-nsdecimalnumber-and-the-nsdecimal-type" id="id27" name="id27">Class <code><span>NSDecimalNumber</span></code> and the <code><span>NSDecimal</span></code> type</a></li>
+<li><a href="#class-nsdictionary" id="id28" name="id28">Class <code><span>NSDictionary</span></code></a></li>
+<li><a href="#class-nsfault" id="id29" name="id29">Class <code><span>NSFault</span></code></a></li>
+<li><a href="#class-nsindexset" id="id30" name="id30">Class <code><span>NSIndexSet</span></code></a></li>
+<li><a href="#class-nsinvocation" id="id31" name="id31">Class <code><span>NSInvocation</span></code></a></li>
+<li><a href="#class-nsmutablearray" id="id32" name="id32">Class <code><span>NSMutableArray</span></code></a></li>
+<li><a href="#class-nsnetservice" id="id33" name="id33">Class <code><span>NSNetService</span></code></a></li>
+<li><a href="#class-nsobject" id="id34" name="id34">Class <code><span>NSObject</span></code></a></li>
+<li><a href="#class-nsscriptobjectspecifier" id="id35" name="id35">Class <code><span>NSScriptObjectSpecifier</span></code></a></li>
+<li><a href="#class-nsset" id="id36" name="id36">Class <code><span>NSSet</span></code></a></li>
+<li><a href="#class-nsstring" id="id37" name="id37">Class <code><span>NSString</span></code></a></li>
+<li><a href="#class-nsthread" id="id38" name="id38">class <code><span>NSThread</span></code></a></li>
 </ul>
 </li>
-<li><a href="#interfacebuilder-framework" id="id38" name="id38">InterfaceBuilder framework</a><ul>
-<li><a href="#class-ibobjcsourceparser" id="id39" name="id39">Class <code><span>IBObjCSourceParser</span></code></a></li>
-<li><a href="#id1" id="id40" name="id40">Class <code><span>NSView</span></code></a></li>
-<li><a href="#class-nsibobjectdata" id="id41" name="id41">Class <code><span>NSIBObjectData</span></code></a></li>
-<li><a href="#class-ibobjectcontainer" id="id42" name="id42">Class <code><span>IBObjectContainer</span></code></a></li>
-<li><a href="#class-ibxmldecoder" id="id43" name="id43">Class <code><span>IBXMLDecoder</span></code></a></li>
-<li><a href="#class-ibsplitscrollview" id="id44" name="id44">Class <code><span>IBSplitScrollView</span></code></a></li>
+<li><a href="#interfacebuilder-framework" id="id39" name="id39">InterfaceBuilder framework</a><ul>
+<li><a href="#class-ibobjcsourceparser" id="id40" name="id40">Class <code><span>IBObjCSourceParser</span></code></a></li>
+<li><a href="#id1" id="id41" name="id41">Class <code><span>NSView</span></code></a></li>
+<li><a href="#class-nsibobjectdata" id="id42" name="id42">Class <code><span>NSIBObjectData</span></code></a></li>
+<li><a href="#class-ibobjectcontainer" id="id43" name="id43">Class <code><span>IBObjectContainer</span></code></a></li>
+<li><a href="#class-ibxmldecoder" id="id44" name="id44">Class <code><span>IBXMLDecoder</span></code></a></li>
+<li><a href="#class-ibsplitscrollview" id="id45" name="id45">Class <code><span>IBSplitScrollView</span></code></a></li>
 </ul>
 </li>
-<li><a href="#preferencepanes-framework" id="id45" name="id45">PreferencePanes framework</a></li>
-<li><a href="#screensaver-framework" id="id46" name="id46">ScreenSaver framework</a><ul>
-<li><a href="#class-screensaverdefaults" id="id47" name="id47">Class <code><span>ScreenSaverDefaults</span></code></a></li>
-<li><a href="#class-screensaverview" id="id48" name="id48">Class <code><span>ScreenSaverView</span></code></a></li>
+<li><a href="#preferencepanes-framework" id="id46" name="id46">PreferencePanes framework</a></li>
+<li><a href="#screensaver-framework" id="id47" name="id47">ScreenSaver framework</a><ul>
+<li><a href="#class-screensaverdefaults" id="id48" name="id48">Class <code><span>ScreenSaverDefaults</span></code></a></li>
+<li><a href="#class-screensaverview" id="id49" name="id49">Class <code><span>ScreenSaverView</span></code></a></li>
 </ul>
 </li>
 </ul>
 on MacOS X. In general you can use classes and global functions just like
 in Objective-C (e.g. the Apple developer documentaton applies), but in some
 cases there are special considerations.</p>
-<p>We also do not provide access to global functions that are not usefull for
+<p>We also do not provide access to global functions that are not useful for
 Python programs, those functions are listed below.</p>
-<p>This document list the examples to the basic rules. If a method uses pointers
+<p>This document lists the exceptions to the basic rules. If a method uses pointers
 to return additional values, the Python wrapper for that method returns a tuple
 containing the original return value and the additional values. You don't have
 to pass values for those arguments, unless the method uses the values you
 pass in.</p>
-<p>This document is target at the latest supported version of MacOS X (currenlty
-MacOS X 10.2.x), unless specifically noted the same restrictions apply to 
+<p>This document is targeted at the latest supported version of MacOS X (currently
+MacOS X 10.3.x); unless specifically noted the same restrictions apply to 
 earlier versions of MacOS X. Earlier versions of the OS have less extensive
 APIs, PyObjC does <i>not</i> provide a compatibility layer.</p>
 <p>Frameworks not listed below are not wrapped by PyObjC, they can still be
 <h2><a href="#id3" name="core-objective-c-runtime">Core objective-C runtime</a></h2>
 <h3><a href="#id4" name="class-protocol">Class Protocol</a></h3>
 <ul>
-<li><code><span>descriptionForClassMethod:</span></code>, <code><span>descriptionForInstanceMethod</span></code><p>These methods are not supported, protocols are hardly ever used explicitly
+<li><code><span>descriptionForClassMethod:</span></code>, <code><span>descriptionForInstanceMethod</span></code><p>These methods are not supported. Protocols are hardly ever used explicitly
 in Cocoa therefore this should not be a problem.</p>
 </li>
 </ul>
 <h2><a href="#id5" name="addressbook-framework">Addressbook framework</a></h2>
-<p>We do not provide access to the global functions in that framework, because
+<p>We do not provide access to the global functions in this framework, because
 the same functionality can be accessed by using the object-oriented interface.</p>
 <h2><a href="#id6" name="appkit-framework">AppKit framework</a></h2>
 <p>The callback methods for the NSSheet API's have a non-default signature
 Both return <code><span>(pattern,</span> <span>actualCount,</span> <span>phase)</span></code>. The <code><span>pattern</span></code> is <code><span>None</span></code>
 when the input argument is <code><span>0</span></code>.</p>
 </li>
-<li><code><span>appendBezierPathWithGlyphs:count:inFont:</span></code><p>The first argument is a list of integers, count should be at most the lenght
+<li><code><span>appendBezierPathWithGlyphs:count:inFont:</span></code><p>The first argument is a list of integers, count should be at most the length
 of the first argument.</p>
 </li>
-<li><code><span>appendBezierPathWithPoints:count:</span></code><p>The first argument is a list of points, count should be at most the lenght
+<li><code><span>appendBezierPathWithPoints:count:</span></code><p>The first argument is a list of points, count should be at most the length
 of the first argument.</p>
 </li>
 <li><code><span>setAssociatedPoints:atIndex:</span></code><p>Implementing this method in Python is not yet supported.</p>
 </li>
 <li><code><span>getTIFFCompressionTypes:count:</span></code><p>This method is not supported (yet)</p>
 </li>
-<li><code><span>initWithBitmapDataPlanes:pixesWide:pixelsHigh:bitPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:</span></code><p>This method is not supported (yet)</p>
+<li><code><span>initWithBitmapDataPlanes:pixesWide:pixelsHigh:bitsPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:</span></code><p>This method is not supported (yet)</p>
 </li>
 </ul>
 <h3><a href="#id10" name="class-nsfont">Class <code><span>NSFont</span></code></a></h3>
 </ul>
 <h3><a href="#id13" name="class-nsmatrix">Class <code><span>NSMatrix</span></code></a></h3>
 <ul>
-<li><code><span>sortUsingFunction:context</span></code><p>Calling this method from Python is supported, overriding it in Python
+<li><code><span>sortUsingFunction:context:</span></code><p>Calling this method from Python is supported, overriding it in Python
 is not. The <code><span>context</span></code> can be an arbitrary python object.</p>
 </li>
 </ul>
 </ul>
 <h3><a href="#id17" name="class-nsquickdrawview">Class <code><span>NSQuickDrawView</span></code></a></h3>
 <ul>
-<li><code><span>qdPort</span></code><p>This method returns an instance from a type Carbon.QuickDraw. This 
+<li><code><span>qdPort</span></code><p>This method returns an instance of type Carbon.QuickDraw. This 
 requires MacPython.</p>
 </li>
 </ul>
 </ul>
 <h2><a href="#id21" name="foundation-framework">Foundation framework</a></h2>
 <p>NOTE: The list below is mostly based on scripts that find methods that can
-not be automaticly handled by the bridge. We have not yet performed a manual
+not be automatically handled by the bridge. We have not yet performed a manual
 search for such methods in the Cocoa documentation.</p>
 <p>The <code><span>-forward::</span></code> method is not supported. It's functionality can be accessed
 using the python function <code><span>apply</span></code>. The <code><span>performv::</span></code> method is also not
-supported, with a simular work-around.</p>
+supported, with a similar work-around.</p>
 <p>Structs are wrapped using a struct-like type. They can be accessed using the
 field-names from Objective-C, or you can access them as sequences. Accessing
-them as sequences is necessary for backward compatibility and is depericated.</p>
+them as sequences is necessary for backward compatibility and is deprecated.</p>
 <h3><a href="#id22" name="class-nsarray">Class <code><span>NSArray</span></code></a></h3>
 <ul>
 <li><code><span>initWithObjects:</span></code>, <code><span>arrayWithObjects:</span></code><p>These methods are not supported, use <code><span>initWithArray:</span></code> instead.</p>
 <li><code><span>addObserver:toObjectsAtIndexes:forKeyPath:options:context:</span></code><p>The context is an integer, not a <code><span>void*</span></code>.</p>
 </li>
 </ul>
-<h3><a href="#id23" name="class-nsbundle">Class <code><span>NSBundle</span></code></a></h3>
+<h3><a href="#id23" name="class-nsautoreleasepool">Class <code><span>NSAutoreleasePool</span></code></a></h3>
+<p>The bridge automaticly manages reference counts for you, but you're still 
+required to make an autorelease pool available.</p>
+<p>In simple, single-threaded GUI programs you don't have to do anything for this,
+because NSRunLoop does this for you and PyObjC creates an initial pool for the
+main thread.</p>
+<p>If you create lots of Cocoa objects in a loop it can be usefull to manually create
+a pool to reclaim memory as soon as possible. The proper idiom for this is:</p>
+<pre>
+while &lt;test&gt;:
+        pool = NSAutoreleasePool.alloc().init()
+
+        # ... Do work here ...
+
+        del pool
+</pre>
+<p>That is, you <i>must</i> ensure that the previous pool is deallocated before you create
+a new one, the code below will silently leak memory:</p>
+<pre>
+while &lt;test&gt;:
+        pool = NSAutoreleasePool.alloc().init()
+
+        # ... Do work here ...
+</pre>
+<h3><a href="#id24" name="class-nsbundle">Class <code><span>NSBundle</span></code></a></h3>
 <ul>
 <li><code><span>bundleForClass:</span></code><p>This method does not work correctly for classes defined in Python, these
 all seem be defined in the <code><span>mainBundle()</span></code>. As a workaround you can use
 Python based bundle. See Examples/PrefPane for an example of its usage.</p>
 </li>
 </ul>
-<h3><a href="#id24" name="class-nscoder">Class <code><span>NSCoder</span></code></a></h3>
+<h3><a href="#id25" name="class-nscoder">Class <code><span>NSCoder</span></code></a></h3>
 <p>The following methods are not supported in the current version of PyObjC.
 This limitation will be lifted in a future version of the bridge.</p>
 <ul>
 <p>The method <code><span>decodeBytesWithoutReturnedLength:</span></code> is not supported, use 
 <code><span>decodeBytesWithReturnedLength:</span></code> instead. It is not possible to safely
 represent the return value of this method in Python.</p>
-<h3><a href="#id25" name="class-nsdata">Class <code><span>NSData</span></code></a></h3>
+<h3><a href="#id26" name="class-nsdata">Class <code><span>NSData</span></code></a></h3>
 <ul>
 <li><code><span>initWithBytesNoCopy:length:</span></code><p>This method is not supported, use <code><span>initWithBytes:length:</span></code> instead.</p>
 </li>
 </li>
 <li><code><span>dataWithBytesNoCopy:length:freeWhenDone:</span></code><p>This method is not supported, use <code><span>dataWithBytes:length:</span></code> instead.</p>
 </li>
-<li><code><span>deserializeAlignedBytesLengthAtCursor:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeAlignedBytesLengthAtCursor:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
-<li><code><span>deserializeBytes:length:atCursor:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeBytes:length:atCursor:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
-<li><code><span>deserializeDataAt:ofObjCType:atCursor:context:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeDataAt:ofObjCType:atCursor:context:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
-<li><code><span>deserializeIntAtCursor:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeIntAtCursor:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
-<li><code><span>deserializeInts:count:atCursor:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeInts:count:atCursor:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
-<li><code><span>deserializeInts:count:atIndex:</span></code><p>This is a depricated method, see Apple documentation.</p>
+<li><code><span>deserializeInts:count:atIndex:</span></code><p>This is a deprecated method, see Apple documentation.</p>
 </li>
 <li><code><span>getBytes:</span></code>, <code><span>getBytes:length:</span></code>, <code><span>getBytes:range:</span></code>
 Use <code><span>bytes</span></code> instead, and then use subscripting to get the
 desired range.</li>
 </ul>
-<h3><a href="#id26" name="class-nsdecimalnumber-and-the-nsdecimal-type">Class <code><span>NSDecimalNumber</span></code> and the <code><span>NSDecimal</span></code> type</a></h3>
+<h3><a href="#id27" name="class-nsdecimalnumber-and-the-nsdecimal-type">Class <code><span>NSDecimalNumber</span></code> and the <code><span>NSDecimal</span></code> type</a></h3>
 <p>NSDecimal is wrapped by a Python type. This type does not (yet) support
 mathematical operators, but does support explicit conversion to and from
 Python numbers.</p>
 int or long (not a float because of the representation issues for floats).</p>
 <p>Converting an <code><span>NSDecimal</span></code> to a float or int: <code><span>aDecimal.as_int()</span></code> and
 <code><span>aDecimal.as_float</span></code>.</p>
-<h3><a href="#id27" name="class-nsdictionary">Class <code><span>NSDictionary</span></code></a></h3>
+<h3><a href="#id28" name="class-nsdictionary">Class <code><span>NSDictionary</span></code></a></h3>
 <p>The (undocumented) methods <code><span>getKeys:</span></code>, <code><span>getObjects:</span></code> and 
 <code><span>getObjects:andKeys:</span></code> are not supported.</p>
-<h3><a href="#id28" name="class-nsfault">Class <code><span>NSFault</span></code></a></h3>
+<h3><a href="#id29" name="class-nsfault">Class <code><span>NSFault</span></code></a></h3>
 <p>The <code><span>extraData</span></code> argument/return value for <code><span>-extraData</span></code> and 
 <code><span>setTargetClassextraData:</span></code> is represented as an integer.</p>
-<h3><a href="#id29" name="class-nsindexset">Class <code><span>NSIndexSet</span></code></a></h3>
+<h3><a href="#id30" name="class-nsindexset">Class <code><span>NSIndexSet</span></code></a></h3>
 <ul>
 <li><code><span>getIndexes:maxCount:inIndexRange:</span></code>
 The usage is:<pre>
 </pre>
 </li>
 </ul>
-<h3><a href="#id30" name="class-nsinvocation">Class <code><span>NSInvocation</span></code></a></h3>
+<h3><a href="#id31" name="class-nsinvocation">Class <code><span>NSInvocation</span></code></a></h3>
 <p>In some versions of MacOS X, NSInvocation doesn't work properly with structs
 that contain padding. Such structs are not used in the MacOS X API, but may
 be present in 3th party code. This leads to problems when <code><span>forwardInvocation:</span></code>
 is used to call a method that has such a struct as one of its arguments.</p>
-<h3><a href="#id31" name="class-nsmutablearray">Class <code><span>NSMutableArray</span></code></a></h3>
+<h3><a href="#id32" name="class-nsmutablearray">Class <code><span>NSMutableArray</span></code></a></h3>
 <ul>
 <li><code><span>sortUsingFunction:context:</span></code>, <code><span>sortUsingFunction:context:range:</span></code><p>Calling this method from Python is supported, overriding it in a subclass
 is not. This limitation will be fixed in a later version of PyObjC.</p>
 <p>The <code><span>context</span></code> can be an arbitrary python object.</p>
 </li>
 </ul>
-<h3><a href="#id32" name="class-nsnetservice">Class <code><span>NSNetService</span></code></a></h3>
+<h3><a href="#id33" name="class-nsnetservice">Class <code><span>NSNetService</span></code></a></h3>
 <ul>
-<li><code><span>addresses</span></code><p>When calling this from Python this methods returns a tuple of adress-info
+<li><code><span>addresses</span></code><p>When calling this from Python this methods returns a tuple of address info
 tuples, like the values returned by <code><span>socket.getpeeraddr()</span></code>.</p>
 </li>
 </ul>
-<h3><a href="#id33" name="class-nsobject">Class <code><span>NSObject</span></code></a></h3>
+<h3><a href="#id34" name="class-nsobject">Class <code><span>NSObject</span></code></a></h3>
 <ul>
 <li><code><span>observationInfo</span></code>, <code><span>setObservationInfo:</span></code><p>These methods can be used from Python, but the <code><span>observationInfo</span></code> is 
 represented by an integer instead of <code><span>void*</span></code>. This probably makes it
-impossible to do anything usefull with these methods.</p>
+impossible to do anything useful with these methods.</p>
 </li>
 <li><code><span>addObserver:forKeyPath:options:context:</span></code><p>The context is an integer.</p>
 </li>
 of PyObjC.</p>
 </li>
 </ul>
-<h3><a href="#id34" name="class-nsscriptobjectspecifier">Class <code><span>NSScriptObjectSpecifier</span></code></a></h3>
+<h3><a href="#id35" name="class-nsscriptobjectspecifier">Class <code><span>NSScriptObjectSpecifier</span></code></a></h3>
 <ul>
 <li><code><span>indicesOfObjectsByEvaluatingWithContainer:count:</span></code><p>Implementing this in Python is not supported yet. We're looking for a way
 to avoid leaking the returned buffer, as we cannot return a pointer to an
 internal datastructure.</p>
 </li>
 </ul>
-<h3><a href="#id35" name="class-nsset">Class <code><span>NSSet</span></code></a></h3>
+<h3><a href="#id36" name="class-nsset">Class <code><span>NSSet</span></code></a></h3>
 <ul>
 <li><code><span>initWithObjects:</span></code>, <code><span>setWithObjects:</span></code><p>This method is not supported, use <code><span>initWithArray:</span></code> instead.</p>
 </li>
 </ul>
-<h3><a href="#id36" name="class-nsstring">Class <code><span>NSString</span></code></a></h3>
+<h3><a href="#id37" name="class-nsstring">Class <code><span>NSString</span></code></a></h3>
 <p>Objective-C strings are usually represented as instances of a subclass of
 the Python type <code><span>unicode</span></code>. It is possible to access the &quot;real&quot; Objective-C
 string by using the method <code><span>NSString</span></code>. This should only be necessary when
 dealing with mutable strings, or when you want to access methods that don't
 have a Python equivalent.</p>
 <ul>
-<li><code><span>initWithCharactersNoCopy:length:freeWhenDone:</span></code><p>This method is unsupported because we cannot guarantee that the buffer wil
+<li><code><span>initWithCharactersNoCopy:length:freeWhenDone:</span></code><p>This method is unsupported because we cannot guarantee that the buffer will
 be available as long as the string is. Use <code><span>initWithCharacters:</span></code> instead.</p>
 </li>
-<li><code><span>getCharacters:</span></code> and <code><span>getCharacters:range:</span></code><p>These methods are not supported at the moment. This limitation will be liften
+<li><code><span>getCharacters:</span></code> and <code><span>getCharacters:range:</span></code><p>These methods are not supported at the moment. This limitation will be lifted
 in a future version of the bridge.</p>
 </li>
 <li><code><span>getCString:maxLength:range:remainingRange:</span></code> and <code><span>getCString:maxLength:</span></code><p>Calling these methods from Python is supported, overriding them from 
-Python is not. This limitation will be liften in a future version of the
+Python is not. This limitation will be lifted in a future version of the
 bridge.</p>
 </li>
 <li><code><span>getCString:</span></code><p>This method is not supported. Use <code><span>getCString:maxLength:</span></code> instead (using
 the length of the string as the maximum length). This limitation will be
-liften in a future version of the bridge.</p>
+lifted in a future version of the bridge.</p>
 </li>
 </ul>
-<h3><a href="#id37" name="class-nsthread">class <code><span>NSThread</span></code></a></h3>
-<p>When you're using Python 2.3 or later it is save to call from Objective-C to
+<h3><a href="#id38" name="class-nsthread">class <code><span>NSThread</span></code></a></h3>
+<p>When you're using Python 2.3 or later it is safe to call from Objective-C to
 Python on any thread. Otherwise you must be sure that the current thread has
 acquired the GIL. This means you shouldn't use API's that will call back on
 an arbitrary thread unless you're using Python 2.3 or later. It is safe to 
 performance impact.</p>
 </li>
 </ul>
-<h2><a href="#id38" name="interfacebuilder-framework">InterfaceBuilder framework</a></h2>
+<h2><a href="#id39" name="interfacebuilder-framework">InterfaceBuilder framework</a></h2>
 <p>I (Ronald) have not found documentation for this framework, therefore the
 following methods with a &quot;difficult&quot; signature are not supported.</p>
 <p>Please let me know if there is documentation for this framework.</p>
-<h3><a href="#id39" name="class-ibobjcsourceparser">Class <code><span>IBObjCSourceParser</span></code></a></h3>
+<h3><a href="#id40" name="class-ibobjcsourceparser">Class <code><span>IBObjCSourceParser</span></code></a></h3>
 <ul>
 <li><code><span>parseClass:</span></code></li>
 </ul>
-<h3><a href="#id40" name="id1">Class <code><span>NSView</span></code></a></h3>
+<h3><a href="#id41" name="id1">Class <code><span>NSView</span></code></a></h3>
 <ul>
 <li><code><span>objectAtPoint:rect:</span></code><p>Defined in a catagory on <code><span>NSView</span></code>.</p>
 </li>
 </ul>
-<h3><a href="#id41" name="class-nsibobjectdata">Class <code><span>NSIBObjectData</span></code></a></h3>
+<h3><a href="#id42" name="class-nsibobjectdata">Class <code><span>NSIBObjectData</span></code></a></h3>
 <ul>
 <li><code><span>restoreFromObjectDataInfo:</span></code></li>
 <li><code><span>snapshotIntoObjectDataInfo:</span></code></li>
 </ul>
-<h3><a href="#id42" name="class-ibobjectcontainer">Class <code><span>IBObjectContainer</span></code></a></h3>
+<h3><a href="#id43" name="class-ibobjectcontainer">Class <code><span>IBObjectContainer</span></code></a></h3>
 <ul>
 <li><code><span>decodeObjectToIntMapTableForKey:fromCoder:alwaysCreate:</span></code></li>
 <li><code><span>decodeObjectToObjectMapTableForKey:fromCoder:alwaysCreate:</span></code></li>
 </ul>
-<h3><a href="#id43" name="class-ibxmldecoder">Class <code><span>IBXMLDecoder</span></code></a></h3>
+<h3><a href="#id44" name="class-ibxmldecoder">Class <code><span>IBXMLDecoder</span></code></a></h3>
 <ul>
 <li><code><span>allocObjectWithClassName:</span></code></li>
 </ul>
-<h3><a href="#id44" name="class-ibsplitscrollview">Class <code><span>IBSplitScrollView</span></code></a></h3>
+<h3><a href="#id45" name="class-ibsplitscrollview">Class <code><span>IBSplitScrollView</span></code></a></h3>
 <ul>
 <li><code><span>getMinimumX:maximumX:</span></code></li>
 </ul>
-<h2><a href="#id45" name="preferencepanes-framework">PreferencePanes framework</a></h2>
-<p>This framework seems to define usefull classes like <code><span>NSAuthorization</span></code> and
-<code><span>NSKeychain</span></code>, but these are not documented and some usefull methods have
+<h2><a href="#id46" name="preferencepanes-framework">PreferencePanes framework</a></h2>
+<p>This framework seems to define useful classes like <code><span>NSAuthorization</span></code> and
+<code><span>NSKeychain</span></code>, but these are not documented and some useful methods have
 a hard signature.</p>
-<p>The only documented class, <code><span>NSPreferencePane</span></code> is fully supported.</p>
-<h2><a href="#id46" name="screensaver-framework">ScreenSaver framework</a></h2>
-<h3><a href="#id47" name="class-screensaverdefaults">Class <code><span>ScreenSaverDefaults</span></code></a></h3>
+<p>The only documented class, <code><span>NSPreferencePane</span></code>, is fully supported.</p>
+<h2><a href="#id47" name="screensaver-framework">ScreenSaver framework</a></h2>
+<h3><a href="#id48" name="class-screensaverdefaults">Class <code><span>ScreenSaverDefaults</span></code></a></h3>
 <p>This class is fully supported.</p>
-<h3><a href="#id48" name="class-screensaverview">Class <code><span>ScreenSaverView</span></code></a></h3>
+<h3><a href="#id49" name="class-screensaverview">Class <code><span>ScreenSaverView</span></code></a></h3>
 <p>This class is fully supported.</p>
 </body>
 </html>

File Doc/architecture.html

 </tbody>
 </table>
 <h2><a name="introduction">Introduction</a></h2>
-<p>XXX: This documented is outdated and incomplete.</p>
-<p>This document gives a (brief) description of how the PyObjc package is 
+<p>XXX: This documentent is outdated and incomplete.</p>
+<p>This document gives a (brief) description of how the PyObjC package is 
 structured.</p>
 <h2><a name="objective-c-classes-and-objects">Objective-C classes and objects</a></h2>
 <p>Objective-C classes are represented directly as python classes. This allows
 storing the additional information in a dictionary indexed by the PyTypeObjects
 that represent Objective-C classes.</p>
 <p>Objective-C objects are represented by proxy objects that are instances of
-the classes descriped above.</p>
+the classes described above.</p>
 <p>TODO: work out how we'll implement subclasses objects and describe here.</p>
 <h2><a name="methods-and-instance-variables">Methods and instance variables</a></h2>
 <p>Methods and instance variables are represented as 'descriptor' objects that

File Doc/intro.html

 :copyright: 2003 The PyObjC Project -->
 <h2>Contents</h2>
 <ul>
-<li><a href="#preface" id="id3" name="id3">Preface</a></li>
-<li><a href="#objective-c-for-pyobjc-users" id="id4" name="id4">Objective-C for PyObjC users</a></li>
-<li><a href="#overview-of-the-bridge" id="id5" name="id5">Overview of the bridge</a><ul>
-<li><a href="#classes" id="id6" name="id6">Classes</a></li>
-<li><a href="#methods-and-functions" id="id7" name="id7">Methods and functions</a></li>
-<li><a href="#reference-counting" id="id8" name="id8">Reference counting</a></li>
-<li><a href="#informal-protocols" id="id9" name="id9">(Informal) protocols</a></li>
-<li><a href="#cocoa-bindings" id="id10" name="id10">Cocoa Bindings</a></li>
+<li><a href="#preface" id="id4" name="id4">Preface</a></li>
+<li><a href="#objective-c-for-pyobjc-users" id="id5" name="id5">Objective-C for PyObjC users</a></li>
+<li><a href="#overview-of-the-bridge" id="id6" name="id6">Overview of the bridge</a><ul>
+<li><a href="#classes" id="id7" name="id7">Classes</a></li>
+<li><a href="#methods-and-functions" id="id8" name="id8">Methods and functions</a></li>
+<li><a href="#reference-counting" id="id9" name="id9">Reference counting</a></li>
+<li><a href="#informal-protocols" id="id10" name="id10">(Informal) protocols</a></li>
+<li><a href="#cocoa-bindings" id="id11" name="id11">Cocoa Bindings</a></li>
 </ul>
 </li>
-<li><a href="#cocoa-for-python-programmers" id="id11" name="id11">Cocoa for Python programmers</a></li>
-<li><a href="#notes-on-specific-tasks" id="id12" name="id12">Notes on specific tasks</a><ul>
-<li><a href="#working-with-threads" id="id13" name="id13">Working with threads</a></li>
-<li><a href="#finalizers" id="id14" name="id14">Finalizers</a></li>
+<li><a href="#cocoa-for-python-programmers" id="id12" name="id12">Cocoa for Python programmers</a></li>
+<li><a href="#notes-on-specific-tasks" id="id13" name="id13">Notes on specific tasks</a><ul>
+<li><a href="#working-with-threads" id="id14" name="id14">Working with threads</a></li>
+<li><a href="#finalizers" id="id15" name="id15">Finalizers</a></li>
 </ul>
 </li>
-<li><a href="#building-applications" id="id15" name="id15">Building applications</a><ul>
-<li><a href="#pure-python-buildapp-py" id="id16" name="id16">&quot;Pure Python&quot; :  buildapp.py</a></li>
-<li><a href="#ide-approach-project-builder" id="id17" name="id17">&quot;IDE approach&quot; : Project builder</a></li>
+<li><a href="#building-applications" id="id16" name="id16">Building applications</a><ul>
+<li><a href="#pure-python-buildapp-py" id="id17" name="id17">&quot;Pure Python&quot; :  buildapp.py</a></li>
+<li><a href="#ide-approach-xcode" id="id18" name="id18">&quot;IDE approach&quot; : Xcode</a></li>
 </ul>
 </li>
 </ul>
-<h2><a href="#id3" name="preface">Preface</a></h2>
+<h2><a href="#id4" name="preface">Preface</a></h2>
 <p>PyObjC is a bridge between Python and Objective-C. It allows you to write 
 Python scripts that use and extend existing Objective-C class libraries, 
 most importantly the <a href="http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html">Cocoa libraries</a> by <a href="http://www.apple.com/">Apple</a>.</p>
 <p>This document describes how to use Objective-C class libraries from Python
 scripts and how to interpret the documentation of those libraries, from the 
 point of view of a Python programmer.</p>
-<h2><a href="#id4" name="objective-c-for-pyobjc-users">Objective-C for PyObjC users</a></h2>
+<h2><a href="#id5" name="objective-c-for-pyobjc-users">Objective-C for PyObjC users</a></h2>
 <p>It is necessary to understand a little bit of Objective-C to use PyObjC,
 this helps you to better understand the class libraries and makes it easier
 to read (and translate) example code.</p>
 Objective-C. The former is done by the class-method <code><span>alloc</span></code>, while the
 latter is done by instance-methods whose name customarily starts with <code><span>init</span></code>.</p>
 <p>Objective-C code looks just like plain C code, with some easily recognizable
-extensions for the Object-Oriented parts of the language. And example class
+extensions for the Object-Oriented parts of the language. An example class
 declaration (usually found in <code><span>.h</span></code> files) and implementation (usually found
-in <code><span>.m</span></code> files) are listed below). Class declarations are easily recognized as 
-blocks of code between <code><span>@interface</span></code> and <code><span>@end</span></code>, and simularly the 
+in <code><span>.m</span></code> files) are listed below. Class declarations are easily recognized as 
+blocks of code between <code><span>@interface</span></code> and <code><span>@end</span></code>, and similarly the 
 implementation is between <code><span>@implementation</span></code> and <code><span>@end</span></code>. Calling methods
 is done using expressions enclosed with brackets (name?), e.g. 
 <code><span>[foo</span> <span>method]</span></code>.  This is the same as <code><span>foo.method()</span></code> in Python.</p>
 
 @end
 </pre>
-<p>Objective-C also features exceptions, but as those are mostly used for disaster
+<p>Objective-C also features exceptions, but as they are mostly used for disaster
 recovery and not for normal error handling you won't see them very often
-in example code. The <a href="http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/index.html">The Objective-C Programming Language</a> if you want to
+in example code. Read <a href="http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/index.html">The Objective-C Programming Language</a> if you want to
 know more about exceptions in Objective-C.</p>
 <p>One thing to keep in mind when translating Objective-C snippets to python is
 that it is valid to call methods on <code><span>nil</span></code> (that is the NULL pointer). Those
 method calls are ignored by the runtime. The value <code><span>nil</span></code> is represented in
-Python by the <code><span>None</span></code>, this means that calls to non-existing methods are
-not ignored but will raise <code><span>AttributeError</span></code>.</p>
+Python by the <code><span>None</span></code>; this means to access a non-existing method will raise
+<code><span>AttributeError</span></code>.</p>
 <p>For more information about Objective-C see:</p>
 <ul>
 <li><a href="http://developer.apple.com/techpubs/macosx/Cocoa/ObjectiveC/index.html">The Objective-C Programming Language</a> at <a href="http://www.apple.com/">Apple</a>.</li>
 </ul>
-<h2><a href="#id5" name="overview-of-the-bridge">Overview of the bridge</a></h2>
-<h3><a href="#id6" name="classes">Classes</a></h3>
+<h2><a href="#id6" name="overview-of-the-bridge">Overview of the bridge</a></h2>
+<h3><a href="#id7" name="classes">Classes</a></h3>
 <p>Objective-C classes are visible as (new-style) Python classes and can be 
 subclassed just like normal Python classes. All the usual introspection
-mechanism work as well, as do __slots__ and descriptors. The major 
+mechanisms work as well, as do __slots__ and descriptors. The major 
 differences between normal Python classes and Objective-C classes are the way 
 you create instances and the fact that Objective-C methods have odd names.</p>
 <p>You can use multiple inheritance with Objective-C classes, as long as the
-Objetive-C is the first base-class and there is only one Objective-C 
-base-class. E.g. it is not possible to subclass from the Objective-C classes
+Objetive-C class is the first base-class and there is only one Objective-C 
+base-class. E.g. it is not possible to subclass from multiple Objective-C classes
 at the same time. Multiple inheritance should also not be used to mix-in
-different implementations for Objective-C methods, that will not work and
+different implementations for Objective-C methods. It will not work and
 you won't get errors about this.</p>
 <p>Another thing to keep in mind is that the names of Objective-C classes must
-be unique, without taking modules into account. That is, it is <i>not</i> possible
-to have two modules that define a class with the same name. If you write classes
-that will be used outside of a single project it is customary to pick a 
+be unique, including across Python modules. That is, it is <i>not</i> possible
+to have two Python modules that define a class with the same name. If you write 
+classes that will be used outside of a single project it is customary to pick a 
 (short) prefix and stick that in front of all class names, e.g. Apple <code><span>NS</span></code> 
 as the prefix in the <a href="http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html">Cocoa libraries</a>.</p>
 <p>As described in <a href="#objective-c-for-pyobjc-users">Objective-C for PyObjC users</a> the creation of Objective-C 
 then call some variation of <code><span>init</span></code> to initialize the objects. The newly
 created object is the result of the call to <code><span>init</span></code>. Most classes have 
 convienence class methods that combine the calls to <code><span>alloc</span></code> and <code><span>init</span></code>.</p>
-<h3><a href="#id7" name="methods-and-functions">Methods and functions</a></h3>
+<h3><a href="#id8" name="methods-and-functions">Methods and functions</a></h3>
 <p>Objective-C methods are bridged to Python callables. Because Objective-C method 
 names can contain colons it is necessary to translate methods names. The rules
 for translation are:</p>
 <p>One group of exceptions to this rule can be described in a global way. Some
 methods and functions have pointers as arguments, specifically pointers to
 a single value that is passed in and/or out of the function. These arguments
-are sometimes called <i>pass by reference</i> arguments, and can be subdived into
+are sometimes called <i>pass by reference</i> arguments, and can be subdivided into
 three types of arguments: <code><span>in</span></code> arguments are used to pass data to the 
 function, <code><span>out</span></code> arguments are used to pass data from the function (e.g. and
 additional return value) and <code><span>inout</span></code> arguments are a combination of the two.</p>
 
         someMethod_ = objc.selector(someMethod_, ...)
 </pre>
-<h3><a href="#id8" name="reference-counting">Reference counting</a></h3>
+<h3><a href="#id9" name="reference-counting">Reference counting</a></h3>
 <p>The <a href="http://developer.apple.com/techpubs/macosx/Cocoa/CocoaTopics.html">Cocoa libraries</a>, and most (if not all) other class libraries for 
 Objective-C use explicit reference counting to manage memory. The methods
 <code><span>retain</span></code>, <code><span>release</span></code> and <code><span>autorelease</span></code> are used to manage these 
 reference counts. You won't have to manage reference counts in Python, the
-bridge does all that work for you.</p>
+bridge does all that work for you (but see <a href="api-notes-macosx.html">Notes on supported APIs and classes 
+on MacOS X</a> for some advanced issues).</p>
 <p>The only reasons reference counts are mentioned at all are to tell you about
 ignoring them, and more importantly to introduce you to some issues w.r.t. 
 reference counting.</p>
 <p>Another gotcha is when you're manually allocating and assigning delegate(-like)
 objects: most of the time <code><span>obj.setDelegate_()</span></code> will <i>not</i> retain the 
 delegate, so you must keep a reference manually.</p>
-<h3><a href="#id9" name="informal-protocols">(Informal) protocols</a></h3>
+<h3><a href="#id10" name="informal-protocols">(Informal) protocols</a></h3>
 <p>Cocoa defines a number of formal and informal protocols that specify methods
 that should be implemented by a class if it is to be used in a specific role,
 such as the data source for an NSTableView.</p>
 <p>PyObjC will automaticly use the information in the <code><span>informal_protocol</span></code> 
 objects to add the right method signatures to methods, and to warn about
 classes that partially implement a protocol.</p>
-<h3><a href="#id10" name="cocoa-bindings">Cocoa Bindings</a></h3>
+<h3><a href="#id11" name="cocoa-bindings">Cocoa Bindings</a></h3>
 <p>In Mac OS X 10.3 Apple introduced <i>Cocoa Bindings</i>, a method to make it easier
 to create and use <i>Controller</i> objects.</p>
 <p>Use <code><span>objc.accessor</span></code> to create accessor methods that conform to the 
 expectations of Cocoa Bindings.</p>
-<h2><a href="#id11" name="cocoa-for-python-programmers">Cocoa for Python programmers</a></h2>
-<p>Cocoa frameworks are mapped onto Python packages with the same name, that is
-the classes, constants and functioins from the AppKit framework are available
+<h2><a href="#id12" name="cocoa-for-python-programmers">Cocoa for Python programmers</a></h2>
+<p>Cocoa frameworks are mapped onto Python packages with the same name; that is
+the classes, constants and functions from the AppKit framework are available
 after you import <code><span>AppKit</span></code> in your Python script.</p>
 <p>These helper modules contain <i>only</i> functions, constants and classes that 
 wrap items in the corresponding framework. All utility functions and classes 
 are located in the <code><span>PyObjCTools</span></code> package and <code><span>objc</span></code> module. Note that it
 is possible to use <code><span>pydoc</span></code> (or the <code><span>help()</span></code>) function with the framework
-wrappers, but that this is not very usefull for the entire module due to the
+wrappers, but that this is not very useful for the entire module due to the
 size of these modules.</p>
 <p>This makes it easier to find documentation for an item: if you import it 
 from the wrapper module for an Objective-C framework the documentation for
-that item can be found in the documentation for the framework, otherwise the
+that item can be found in the documentation for the framework; otherwise the
 item is documented in the PyObjC documentation.</p>
 <p>The module <code><span>PyObjCTools.NibClassBuilder</span></code> can be used to make working with 
 NIB files more convenient. This module can be used to extract information 
 <li><a href="http://www.stepwise.com/">stepwise.com</a></li>
 <li>Your local bookstore or library</li>
 </ul>
-<h2><a href="#id12" name="notes-on-specific-tasks">Notes on specific tasks</a></h2>
-<h3><a href="#id13" name="working-with-threads">Working with threads</a></h3>
+<h2><a href="#id13" name="notes-on-specific-tasks">Notes on specific tasks</a></h2>
+<h3><a href="#id14" name="working-with-threads">Working with threads</a></h3>
 <p>When you create a thread and want to use PyObjC from that thread you will
 have to create an <code><span>NSAutoreleasePool</span></code> in that thread and clean it up when
 you're done. The easiest way to that is to create an instance of that class
 thread that owns the Python GIL (that's also the reason for not being able 
 to use <code><span>NSThread</span></code> to create new threads).  This restriction will be lifted
 in a future version of PyObjC (at least when using Python 2.3).</p>
-<h3><a href="#id14" name="finalizers">Finalizers</a></h3>
+<h3><a href="#id15" name="finalizers">Finalizers</a></h3>
 <p>In Python you can use the method <code><span>__del__</span></code> to clean up resources when your
 object is garbage collected. In Objective-C/Cocoa this is done with a method 
 named <code><span>dealloc</span></code>.</p>
 <p>In PyObjC you should always use the <code><span>__del__</span></code> method, the <code><span>dealloc</span></code> method
 can safely be ignored and the bridge will complain when you try to override
 this method.</p>
-<h2><a href="#id15" name="building-applications">Building applications</a></h2>
+<h2><a href="#id16" name="building-applications">Building applications</a></h2>
 <p>There are two different ways to build applications with PyObjC. There are no
 major advantages to using either one of them, use the one that is most 
 convenient to you.</p>
-<h3><a href="#id16" name="pure-python-buildapp-py">&quot;Pure Python&quot; :  buildapp.py</a></h3>
-<p>PyObjC includes a copy of the <code><span>bundlebuilder</span></code> module. This module will be
+<h3><a href="#id17" name="pure-python-buildapp-py">&quot;Pure Python&quot; :  buildapp.py</a></h3>
+<p>PyObjC includes a copy of the <code><span>bundlebuilder</span></code> module. This module is
 part of the Python 2.3 MacPython release and offers a way to build
-distutils-style scripts  for building (standalone) applications.</p>
+distutils-style scripts for building (standalone) applications.</p>
 <p>An example <code><span>buildapp.py</span></code> script:</p>
 <pre>
 from bundlebuilder import buildapp
 <p>The online documentation for <code><span>bundlebuilder</span></code> contains more information on 
 building <code><span>buildapp.py</span></code> scripts and how to invoke them. There are plenty of
 example <code><span>buildapp.py</span></code> scripts in the various <a href="../Examples/00ReadMe.txt">Examples</a> subfolders.</p>
-<h3><a href="#id17" name="ide-approach-project-builder">&quot;IDE approach&quot; : Project builder</a></h3>
-<p>PyObjC includes a number of Project Builder templates that can be used to 
+<h3><a href="#id18" name="ide-approach-xcode">&quot;IDE approach&quot; : Xcode</a></h3>
+<p>PyObjC includes a number of Xcode templates that can be used to 
 build (standalone) applications. Those templates are used like any other
-Project Builder template. The only non-obvious detail is that you have to
+Xcode template. The only non-obvious detail is that you have to
 add your sources as resources, but Project Builder usually does the right
 thing when you add a new file.</p>
 <p>The templates will build an application that makes use of the installed copy

File Lib/Foundation/__init__.py

 # to run while we're inside the event loop.
 #
 # The autoGIL module is only present when using Python 2.2 on MacOS X
-try:
-    import autoGIL
-except ImportError:
-    pass
-else:
-    autoGIL.installAutoGIL()
+import sys
+if sys.version_info[:2] == (2, 2):
+    try:
+        import autoGIL
+    except ImportError:
+        pass
+    else:
+        autoGIL.installAutoGIL()
 
 import protocols  # no need to export these, just register with PyObjC
 
 <blockquote>
 <p><a href="http://lists.sourceforge.net/lists/listinfo/pyobjc-dev">http://lists.sourceforge.net/lists/listinfo/pyobjc-dev</a></p>
 </blockquote>
-<p>b.bum &lt;<a href="mailto:bbum@codefab.com">bbum@codefab.com</a>&gt;, Ronald Oussoren &lt;<a href="mailto:oussoren@cistron.nl">oussoren@cistron.nl</a>&gt;</p>
+<p>b.bum &lt;<a href="mailto:bbum@codefab.com">bbum@codefab.com</a>&gt;, Ronald Oussoren &lt;<a href="mailto:ronaldoussoren@mac.com">ronaldoussoren@mac.com</a>&gt;</p>
 </body>
 </html>