Commits

Ronald Oussoren committed b82dd44

- Give a more usefull error message when a method implementation runs of
the end of the function
- Recreate HTML files
- Create seperate directories for the 10.2 and 10.3 installer
- Version is now 1.1a0
- Add wrapper for SecurityInterface (Panther)
This is not very usefull, but it is an Apple defined Objective-C framework.
- Make CodeGen scripts smart enough to detect enums in SecurityInterface

  • Participants
  • Parent commits 21ee9b8

Comments (0)

Files changed (43)

File pyobjc/Doc/C-API.html

 int PyObjC_PythonToObjC(const char* typespec, PyObject* value, void* buffer);
 </pre>
 <p>Convert the value to an Objective-C value of type <code><span>typespec</span></code>. The buffer must
-be at least <code><span>PyObjC_SizeOfType(typespec)</span></code> bytes long.</p>
+be at least <code><span>PyObjCRT_SizeOfType(typespec)</span></code> bytes long.</p>
 <p>NOTE: The <code><span>typespec</span></code> is a type specifier as described in the runtime 
 reference of the Objective-C manual from Apple. Use <code><span>@encode(mytype)</span></code> if to
 get code that is portable to a different Objective-C runtime.</p>
 <code><span>NULL</span></code> it is used to output whether this method should return a new reference
 (TRUE) or a borrowed reference (FALSE).</p>
 <pre>
-int PyObjC_SizeOfType(const char* typespec);
+int PyObjCRT_SizeOfType(const char* typespec);
 </pre>
 <p>Return the size of variables of the specified type.</p>
 <pre>
+int PyObjCRT_AlignOfType(const char* typespec);
+</pre>
+<p>Return the alignment of variables of the specified type.</p>
+<pre>
 Class PyObjCSelector_GetClass(PyObject* sel);
 </pre>
 <p>Return the class containing the definition of <code><span>sel</span></code>.</p>

File pyobjc/Doc/api-notes-macosx.html

 <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-nsdictionary" id="id26" name="id26">Class <code><span>NSDictionary</span></code></a></li>
-<li><a href="#class-nsfault" id="id27" name="id27">Class <code><span>NSFault</span></code></a></li>
-<li><a href="#class-nsmutablearray" id="id28" name="id28">Class <code><span>NSMutableArray</span></code></a></li>
-<li><a href="#class-nsnetservice" id="id29" name="id29">Class <code><span>NSNetService</span></code></a></li>
-<li><a href="#class-nsscriptobjectspecifier" id="id30" name="id30">Class <code><span>NSScriptObjectSpecifier</span></code></a></li>
-<li><a href="#class-nsset" id="id31" name="id31">Class <code><span>NSSet</span></code></a></li>
-<li><a href="#class-nsstring" id="id32" name="id32">Class <code><span>NSString</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>
 </ul>
 </li>
-<li><a href="#interfacebuilder-framework" id="id33" name="id33">InterfaceBuilder framework</a><ul>
-<li><a href="#class-ibobjcsourceparser" id="id34" name="id34">Class <code><span>IBObjCSourceParser</span></code></a></li>
-<li><a href="#id1" id="id35" name="id35">Class <code><span>NSView</span></code></a></li>
-<li><a href="#class-nsibobjectdata" id="id36" name="id36">Class <code><span>NSIBObjectData</span></code></a></li>
-<li><a href="#class-ibobjectcontainer" id="id37" name="id37">Class <code><span>IBObjectContainer</span></code></a></li>
-<li><a href="#class-ibxmldecoder" id="id38" name="id38">Class <code><span>IBXMLDecoder</span></code></a></li>
-<li><a href="#class-ibsplitscrollview" id="id39" name="id39">Class <code><span>IBSplitScrollView</span></code></a></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>
 </ul>
 </li>
-<li><a href="#preferencepanes-framework" id="id40" name="id40">PreferencePanes framework</a></li>
-<li><a href="#screensaver-framework" id="id41" name="id41">ScreenSaver framework</a><ul>
-<li><a href="#class-screensaverdefaults" id="id42" name="id42">Class <code><span>ScreenSaverDefaults</span></code></a></li>
-<li><a href="#class-screensaverview" id="id43" name="id43">Class <code><span>ScreenSaverView</span></code></a></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>
 </ul>
 </li>
 </ul>
 <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>
-These methods are not supported, protocols are hardly ever used explicitly
-in Cocoa therefore this should not be a problem.</li>
+<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
 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><code><span>NSPoint</span></code> is a tuple of 2 floats, or use <code><span>AppKit.NSMakePoint(x,</span> <span>y)</span></code>.</p>
-<p><code><span>NSSize</span></code> is a tuple of 2 floats, or use <code><span>AppKit.NSMakeSize(h,</span> <span>w)</span></code>.</p>
-<p><code><span>NSRect</span></code> is a tuple of an <code><span>NSPoint</span></code> and an <code><span>NSSize</span></code>, or 
-use <code><span>AppKit.NSMakeRect(x,</span> <span>y,</span> <span>h,</span> <span>w)</span></code>.</p>
 <p>The callback methods for the NSSheet API's have a non-default signature
 and no fixed name. You should therefore explicitly specify the signature. This
 is done by calling the <code><span>endSheetMethod</span></code> function after defining your
 <code><span>ptr</span></code> attributes.</p>
 <h3><a href="#id8" name="class-nsbezierpath">Class NSBezierPath</a></h3>
 <ul>
-<li><code><span>getLineDash:count:phase:</span></code>
-This method is not supported, I (Ronald) could not find a way to detect the
-required size for the pattern buffer.</li>
-<li><code><span>appendBezierPathWithGlyphs:count:inFont:</span></code>
-The first argument is a list of integers, count should be at most the lenght
-of the first argument.</li>
-<li><code><span>appendBezierPathWithPoints:count:</span></code>
-The first argument is a list of points, count should be at most the lenght
-of the first argument.</li>
-<li><code><span>setAssociatedPoints:atIndex:</span></code>
-Implementing this method in Python is not yet supported.</li>
+<li><code><span>getLineDash:count:phase:</span></code><p>Use <code><span>getLineDash_count_phase_(0)</span></code> to get the length of the pattern, and
+then use <code><span>getLineDash_count_phase_(actualCount)</span></code> to fetch all information.
+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
+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
+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>
 </ul>
 <h3><a href="#id9" name="class-nsbitmapimagerep">Class <code><span>NSBitmapImageRep</span></code></a></h3>
 <ul>
-<li><code><span>getBitMapDataPlanes</span></code>
-This method is not supported (yet)</li>
-<li><code><span>getTIFFCompressionTypes:count:</span></code>
-This method is not supported (yet)</li>
-<li><code><span>initWithBitmapDataPlanes:pixesWide:pixelsHigh:bitPerSample:samplesPerPixel:hasAlpha:isPlanar:colorSpaceName:bytesPerRow:bitsPerPixel:</span></code>
-This method is not supported (yet)</li>
+<li><code><span>getBitMapDataPlanes</span></code><p>This method is not supported (yet)</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>
 </ul>
 <h3><a href="#id10" name="class-nsfont">Class <code><span>NSFont</span></code></a></h3>
 <ul>
-<li><code><span>positionsForCompositeSequence:numberOfGlyphs:pointArray:</span></code>
-This method is not supported (yet)</li>
+<li><code><span>positionsForCompositeSequence:numberOfGlyphs:pointArray:</span></code><p>This method is not supported (yet)</p>
+</li>
 </ul>
 <h3><a href="#id11" name="class-nsgraphicscontext">Class <code><span>NSGraphicsContext</span></code></a></h3>
 <ul>
-<li><code><span>focusStack</span></code>
-This method is not supported.</li>
-<li><code><span>setFocusStack</span></code>
-This method is not supported.</li>
-<li><code><span>graphicsPort</span></code>
-This method is not yet supported, MacPython doesn't wrap <code><span>CGContextRef</span></code>
-at the moment.</li>
+<li><code><span>focusStack</span></code><p>This method is not supported.</p>
+</li>
+<li><code><span>setFocusStack</span></code><p>This method is not supported.</p>
+</li>
+<li><code><span>graphicsPort</span></code><p>This method is not yet supported, MacPython doesn't wrap <code><span>CGContextRef</span></code>
+at the moment.</p>
+</li>
 </ul>
 <h3><a href="#id12" name="class-nslayoutmanager">Class <code><span>NSLayoutManager</span></code></a></h3>
 <ul>
-<li><code><span>getGlyphs:range:</span></code>
-This method is not yet supported</li>
-<li><code><span>getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:</span></code>
-This method is not yet supported</li>
-<li><code><span>getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:</span></code>
-This method is not yet supported</li>
-<li><code><span>rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:</span></code>
-This method is not yet supported</li>
-<li><code><span>rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:</span></code>
-This method is not yet supported</li>
+<li><code><span>getGlyphs:range:</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>getGlyphsInRange:glyphs:characterIndexes:glyphInscriptions:elasticBits:bidiLevels:</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>rectArrayForCharacterRange:withinSelectedCharacterRange:inTextContainer:rectCount:</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>rectArrayForGlyphRange:withinSelectedGlyphRange:inTextContainer:rectCount:</span></code><p>This method is not yet supported</p>
+</li>
 </ul>
 <h3><a href="#id13" name="class-nsmatrix">Class <code><span>NSMatrix</span></code></a></h3>
 <ul>
-<li><code><span>sortUsingFunction:context</span></code>
-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.</li>
+<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>
 <h3><a href="#id14" name="class-nsmovie">Class <code><span>NSMovie</span></code></a></h3>
 <p>The return value of <code><span>QTMovie</span></code> and the sole argument of <code><span>initWithMovie:</span></code>
 are QT.Movie objects. Using these methods requires the use of MacPython 2.3.</p>
 <h3><a href="#id15" name="class-nsopenglcontext">Class <code><span>NSOpenGLContext</span></code></a></h3>
 <ul>
-<li><code><span>getValues:forParameter:</span></code>
-This method is not yet supported.</li>
-<li><code><span>setValues:forParameter:</span></code>
-This method is not yet supported.</li>
-<li><code><span>setOffScreen:width:height:rowbytes:</span></code>
-This method is not yet supported.</li>
+<li><code><span>getValues:forParameter:</span></code><p>This method is not yet supported.</p>
+</li>
+<li><code><span>setValues:forParameter:</span></code><p>This method is not yet supported.</p>
+</li>
+<li><code><span>setOffScreen:width:height:rowbytes:</span></code><p>This method is not yet supported.</p>
+</li>
 </ul>
 <h3><a href="#id16" name="class-nsopenglpixelformat">Class <code><span>NSOpenGLPixelFormat</span></code></a></h3>
 <ul>
 </ul>
 <h3><a href="#id18" name="class-nssimplehorizontaltypesetter">Class <code><span>NSSimpleHorizontalTypesetter</span></code></a></h3>
 <ul>
-<li><code><span>baseOfTypesetterGlyphInfo</span></code>
-This method is not yet supported</li>
-<li><code><span>layoutGlyphsInHorizontalLineFragment:baseline:</span></code>
-This method is not yet supported</li>
+<li><code><span>baseOfTypesetterGlyphInfo</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>layoutGlyphsInHorizontalLineFragment:baseline:</span></code><p>This method is not yet supported</p>
+</li>
 </ul>
 <h3><a href="#id19" name="class-nsview">Class <code><span>NSView</span></code></a></h3>
 <ul>
-<li><code><span>sortSubviewsUsingFunction:context:</span></code>
-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.</li>
+<li><code><span>sortSubviewsUsingFunction: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>
 <h3><a href="#id20" name="class-nswindow">Class <code><span>NSWindow</span></code></a></h3>
 <ul>
-<li><code><span>graphicsPort</span></code>
-This method is not yet supported</li>
-<li><code><span>initWithWindowRef:</span></code>
-This method is not yet supported</li>
-<li><code><span>windowRef</span></code>
-This method is not yet supported</li>
+<li><code><span>graphicsPort</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>initWithWindowRef:</span></code><p>This method is not yet supported</p>
+</li>
+<li><code><span>windowRef</span></code><p>This method is not yet supported</p>
+</li>
 </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
 <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>
+<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>
 <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>
-These methods are not supported, use <code><span>initWithArray:</span></code> instead.</li>
-<li><code><span>getObjects:</span></code>
-This method is not supported, accessing the objects using the usual
-accessor methods is just as efficient as using this method.</li>
-<li><code><span>getObjects:inRange:</span></code>
-This method is not supported, accessing the objects using the usual
-accessor methods is just as efficient as using this method.</li>
-<li><code><span>sortedArrayUsingFunction:context:</span></code> and <code><span>sortedArrayUsingFunction:context:hint</span></code>
-These methods can be called from Python, but you cannot override them
-from Python. This limitation will be lifted in a future version of PyObjC.<p>The <code><span>context</span></code> can be an arbitrary python object.</p>
+<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>
+<li><code><span>getObjects:</span></code><p>This method is not supported, accessing the objects using the usual
+accessor methods is just as efficient as using this method.</p>
+</li>
+<li><code><span>getObjects:inRange:</span></code><p>This method is not supported, accessing the objects using the usual
+accessor methods is just as efficient as using this method.</p>
+</li>
+<li><code><span>sortedArrayUsingFunction:context:</span></code> and <code><span>sortedArrayUsingFunction:context:hint</span></code><p>These methods can be called from Python, but you cannot override them
+from Python. This limitation will be lifted in a future version of PyObjC.</p>
+<p>The <code><span>context</span></code> can be an arbitrary python object.</p>
+</li>
+<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>
 <ul>
-<li><code><span>bundleForClass:</span></code>
-This method does not work correctly for classes defined in Python, these
+<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
 the function <code><span>objc.pluginBundle(name)</span></code> to find the NSBundle for your
-Python based bundle. See Examples/PrefPane for an example of its usage.</li>
+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>
 <p>The following methods are not supported in the current version of PyObjC.
 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>
 <ul>
-<li><code><span>initWithBytesNoCopy:length:</span></code>
-This method is not supported, use <code><span>initWithBytes:length:</span></code> instead.</li>
-<li><code><span>initWithBytesNoCopy:length:freeWhenDone:</span></code>
-This method is not supported, use <code><span>initWithBytes:length:</span></code> instead.</li>
-<li><code><span>dataWithBytesNoCopy:length:</span></code>
-This method is not supported, use <code><span>dataWithBytes:length:</span></code> instead.</li>
-<li><code><span>dataWithBytesNoCopy:length:freeWhenDone:</span></code>
-This method is not supported, use <code><span>dataWithBytes:length:</span></code> instead.</li>
-<li><code><span>deserializeAlignedBytesLengthAtCursor:</span></code>
-This is a depricated method, see Apple documentation.</li>
-<li><code><span>deserializeBytes:length:atCursor:</span></code>
-This is a depricated method, see Apple documentation.</li>
-<li><code><span>deserializeDataAt:ofObjCType:atCursor:context:</span></code>
-This is a depricated method, see Apple documentation.</li>
-<li><code><span>deserializeIntAtCursor:</span></code>
-This is a depricated method, see Apple documentation.</li>
-<li><code><span>deserializeInts:count:atCursor:</span></code>
-This is a depricated method, see Apple documentation.</li>
-<li><code><span>deserializeInts:count:atIndex:</span></code>
-This is a depricated method, see Apple documentation.</li>
+<li><code><span>initWithBytesNoCopy:length:</span></code><p>This method is not supported, use <code><span>initWithBytes:length:</span></code> instead.</p>
+</li>
+<li><code><span>initWithBytesNoCopy:length:freeWhenDone:</span></code><p>This method is not supported, use <code><span>initWithBytes:length:</span></code> instead.</p>
+</li>
+<li><code><span>dataWithBytesNoCopy:length:</span></code><p>This method is not supported, use <code><span>dataWithBytes:length:</span></code> instead.</p>
+</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>
+<li><code><span>deserializeBytes:length:atCursor:</span></code><p>This is a depricated 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>
+<li><code><span>deserializeIntAtCursor:</span></code><p>This is a depricated 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>
+<li><code><span>deserializeInts:count:atIndex:</span></code><p>This is a depricated 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-nsdictionary">Class <code><span>NSDictionary</span></code></a></h3>
+<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>
+<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>
+<p>Creating an <code><span>NSDecimal</span></code> instance: <code><span>NSDecimal(value)</span></code> or 
+<code><span>NSDecimal(mantisssa,</span> <span>exponent,</span> <span>isNegative)</span></code>.  <code><span>Value</span></code> can be a string,
+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>
 <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="#id27" name="class-nsfault">Class <code><span>NSFault</span></code></a></h3>
+<h3><a href="#id28" 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="#id28" name="class-nsmutablearray">Class <code><span>NSMutableArray</span></code></a></h3>
+<h3><a href="#id29" name="class-nsindexset">Class <code><span>NSIndexSet</span></code></a></h3>
 <ul>
-<li><code><span>sortUsingFunction:context:</span></code>, <code><span>sortUsingFunction:context:range:</span></code>
-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>The <code><span>context</span></code> can be an arbitrary python object.</p>
+<li><code><span>getIndexes:maxCount:inIndexRange:</span></code>
+The usage is:<pre>
+(realCount, indices, newRange) = obj.getIndexes_maxCount_inIndexRange(
+        maxCount, inRange)              
+</pre>
 </li>
 </ul>
-<h3><a href="#id29" name="class-nsnetservice">Class <code><span>NSNetService</span></code></a></h3>
+<h3><a href="#id30" 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>
 <ul>
-<li><code><span>addresses</span></code>
-When calling this from Python this methods returns a tuple of adress-info
-tuples, like the values returned by <code><span>socket.getpeeraddr()</span></code>.</li>
+<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="#id30" name="class-nsscriptobjectspecifier">Class <code><span>NSScriptObjectSpecifier</span></code></a></h3>
+<h3><a href="#id32" name="class-nsnetservice">Class <code><span>NSNetService</span></code></a></h3>
 <ul>
-<li><code><span>indicesOfObjectsByEvaluatingWithContainer:count:</span></code>
-Implementing this in Python is not supported yet. We're looking for a way
+<li><code><span>addresses</span></code><p>When calling this from Python this methods returns a tuple of adress-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>
+<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>
+</li>
+<li><code><span>addObserver:forKeyPath:options:context:</span></code><p>The context is an integer.</p>
+</li>
+<li><code><span>observeValueForKeyPath:ofObject:change:context:</span></code><p>The context is an integer</p>
+</li>
+<li><code><span>methodForSelector:</span></code>, <code><span>instanceMethodForSelector:</span></code><p>These methods return instances of objc.IMP. The major difference with
+Objective-C is that you don't have to, or even can, pass the selector to
+the IMP. In other words, the interface is the same as for unbound
+instance methods: you have to pass <code><span>self</span></code> and the method arguments.</p>
+<p>WARNING: This interface is experimental and might change in a future version
+of PyObjC.</p>
+</li>
+</ul>
+<h3><a href="#id34" 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.</li>
+internal datastructure.</p>
+</li>
 </ul>
-<h3><a href="#id31" name="class-nsset">Class <code><span>NSSet</span></code></a></h3>
+<h3><a href="#id35" name="class-nsset">Class <code><span>NSSet</span></code></a></h3>
 <ul>
-<li><code><span>initWithObjects:</span></code>, <code><span>setWithObjects:</span></code>
-This method is not supported, use <code><span>initWithArray:</span></code> instead.</li>
+<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="#id32" name="class-nsstring">Class <code><span>NSString</span></code></a></h3>
+<h3><a href="#id36" 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> 
-This method is unsupported because we cannot guarantee that the buffer wil
-be available as long as the string is. Use <code><span>initWithCharacters:</span></code> instead.</li>
-<li><code><span>getCharacters:</span></code> and <code><span>getCharacters:range:</span></code>
-These methods are not supported at the moment. This limitation will be liften
-in a future version of the bridge.</li>
-<li><code><span>getCString:maxLength:range:remainingRange:</span></code> and <code><span>getCString:maxLength:</span></code>
-Calling these methods from Python is supported, overriding them from 
+<li><code><span>initWithCharactersNoCopy:length:freeWhenDone:</span></code><p>This method is unsupported because we cannot guarantee that the buffer wil
+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
+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
-bridge.</li>
-<li><code><span>getCString:</span></code>
-This method is not supported. Use <code><span>getCString:maxLength:</span></code> instead (using
+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.</li>
+liften in a future version of the bridge.</p>
+</li>
 </ul>
-<h2><a href="#id33" name="interfacebuilder-framework">InterfaceBuilder framework</a></h2>
+<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
+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 
+start new threads using the Python threading API and run non-Cocoa code on 
+those threads, PyObjC contains code that acquires the GIL whenever the runloop
+in the main thread runs.</p>
+<ul>
+<li><code><span>detachNewThreadSelector:toTarget:withObject:</span></code><p>This method can safely be used when using Python 2.3 or later, on earlier
+releases this will crash the interpreter.</p>
+<p>Make sure that you've either created a thread from Python using the 
+<code><span>thread</span></code> or <code><span>threading</span></code> module, or called <code><span>objc.enableThreading</span></code> before
+using this API. This is necessary to enable threading in the Python 
+interpreter. We don't do this by default because this has a negative 
+performance impact.</p>
+</li>
+</ul>
+<h2><a href="#id38" 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="#id34" name="class-ibobjcsourceparser">Class <code><span>IBObjCSourceParser</span></code></a></h3>
+<h3><a href="#id39" name="class-ibobjcsourceparser">Class <code><span>IBObjCSourceParser</span></code></a></h3>
 <ul>
 <li><code><span>parseClass:</span></code></li>
 </ul>
-<h3><a href="#id35" name="id1">Class <code><span>NSView</span></code></a></h3>
+<h3><a href="#id40" name="id1">Class <code><span>NSView</span></code></a></h3>
 <ul>
-<li><code><span>objectAtPoint:rect:</span></code>
-Defined in a catagory on <code><span>NSView</span></code>.</li>
+<li><code><span>objectAtPoint:rect:</span></code><p>Defined in a catagory on <code><span>NSView</span></code>.</p>
+</li>
 </ul>
-<h3><a href="#id36" name="class-nsibobjectdata">Class <code><span>NSIBObjectData</span></code></a></h3>
+<h3><a href="#id41" 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="#id37" name="class-ibobjectcontainer">Class <code><span>IBObjectContainer</span></code></a></h3>
+<h3><a href="#id42" 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="#id38" name="class-ibxmldecoder">Class <code><span>IBXMLDecoder</span></code></a></h3>
+<h3><a href="#id43" name="class-ibxmldecoder">Class <code><span>IBXMLDecoder</span></code></a></h3>
 <ul>
 <li><code><span>allocObjectWithClassName:</span></code></li>
 </ul>
-<h3><a href="#id39" name="class-ibsplitscrollview">Class <code><span>IBSplitScrollView</span></code></a></h3>
+<h3><a href="#id44" name="class-ibsplitscrollview">Class <code><span>IBSplitScrollView</span></code></a></h3>
 <ul>
 <li><code><span>getMinimumX:maximumX:</span></code></li>
 </ul>
-<h2><a href="#id40" name="preferencepanes-framework">PreferencePanes framework</a></h2>
+<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
 a hard signature.</p>
 <p>The only documented class, <code><span>NSPreferencePane</span></code> is fully supported.</p>
-<h2><a href="#id41" name="screensaver-framework">ScreenSaver framework</a></h2>
-<h3><a href="#id42" name="class-screensaverdefaults">Class <code><span>ScreenSaverDefaults</span></code></a></h3>
+<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>This class is fully supported.</p>
-<h3><a href="#id43" name="class-screensaverview">Class <code><span>ScreenSaverView</span></code></a></h3>
+<h3><a href="#id48" name="class-screensaverview">Class <code><span>ScreenSaverView</span></code></a></h3>
 <p>This class is fully supported.</p>
 </body>
 </html>

File pyobjc/Doc/coding-style.html

 <h2><a href="#id1" name="introduction">Introduction</a></h2>
 <p>This document describes the coding style for PyObjC. Please use this style for
 new code and try apply this style to existing code while working on it.</p>
+<p>The managment summary: 4-space indents in Python code, 1-TAB indents in C
+code.</p>
 <h2><a href="#id2" name="python-code">Python code</a></h2>
 <p>The coding style for core Python is used (see <a href="http://www.python.org/peps/pep-0008.txt">PEP 8</a>). For consistency with
 Cocoa we use mixed-case identifiers (like <code><span>lookUpClass</span></code>).</p>
 <p>The entire <code><span>objc</span></code> module is an &quot;extension&quot; and all items exported from that
 module should be documented in our documentation.</p>
 <h2><a href="#id3" name="c-code">C code</a></h2>
-<p>The coding style for core Python is used (see <a href="http://www.python.org/peps/pep-0007.txt">PEP 7</a>). We use <code><span>PyObjC</span></code> instead
-of <code><span>Py</span></code> as the prefix for globally visible symbols.</p>
+<p>The coding style for core Python is used (see <a href="http://www.python.org/peps/pep-0007.txt">PEP 7</a>). We use <code><span>PyObjC</span></code> 
+instead of <code><span>Py</span></code> as the prefix for globally visible symbols.</p>
+<p>All (Objective-)C files in <code><span>Modules/objc/</span></code> should include <code><span>&quot;pyobjc.h&quot;</span></code> as
+their first include. The (Objective-)C files in the wrappers for frameworks
+should include <code><span>&quot;pyobjc-api.h&quot;</span></code> and should not use other include-files in
+<code><span>Modules/objc</span></code> other than <code><span>pyobjc-api.h</span></code> and <code><span>wrapper-const-table.h</span></code>.</p>
 <h2><a href="#id4" name="documentation">Documentation</a></h2>
 <p>All items exported by the objc module and all PyObjC extensions to Apple
 frameworks (the AppKit and Foundation modules) should be documented using

File pyobjc/Doc/gnustep.html

+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+GNUstep support in PyObjC</title>
+</head>
+<body>
+<h2>GNUstep support in PyObjC</h2>
+<p>PyObjC has limited support for GNUstep, the 'objc' and 'Foundation' packages
+build and pass some, but by far not all, unittests. More work is needed to
+make the GNUstep port as stable as the MacOS X &quot;port&quot;.</p>
+<p>The GNUstep port was primarily developed on Linux i86 (specifically 
+the Debian testing distribution), using python 2.3.2,  gcc 3.3.2 and 
+gnustep-base 1.7.3-1. The code in setup.py works for this configuration,
+but probably not for other configurations.</p>
+<h2><a name="todo">TODO</a></h2>
+<ul>
+<li>Fix bugs found using the unittests</li>
+<li>Port the AppKit wrappers</li>
+<li>Extract more CFLAGS and LDFLAGS information from the GNUstep build system,
+instead of hard-coding the information</li>
+</ul>
+</body>
+</html>

File pyobjc/Doc/intro.html

 <li>Concatenate all elements of the method name: <code><span>someMethod:withFoo:andBar:</span></code></li>
 <li>Then convert all colons to underscores: <code><span>someMethod_withFoo_andBar_</span></code></li>
 </ul>
+<p>It is possible to use Python keywords as method names in Objective-C. To access
+or define such methods append two underscores to its name (e.g. <code><span>class__</span></code>). 
+This is currently only supported for <code><span>raise</span></code> and <code><span>class</span></code> because those are
+the only Python keywords that are actually used in Cocoa.</p>
 <p>Wrapped/bridged methods (and functions) have the same number of arguments
 as the corresponding Objective-C method or function, unless otherwise noted
 in the documentation (<a href="api-notes-macosx.html">Notes on supported APIs and classes on MacOS X</a> for
 <pre>
 rowCount, columnCount = matrix.getNumberOfRows_columns_()
 </pre>
+<p>When a function or method has an array of values and the length of that array
+as arguments, you can pass <code><span>None</span></code> as the length. The length of the sequence
+that is used for the array of values is passed to Objective-C as the length
+argument.</p>
+<p>XXX: Add information about <code><span>array.array</span></code> rules.</p>
+<p>XXX: We don't use the right functions for conversion to C-arrays throughout
+the bridge (yet), the information is therefore not entirely correct.</p>
 <p>When you define methods in a subclass of an Objective-C class, the bridge has
 to tell the Objective-C runtime what the signature of those methods is. The
 basic rule is that all arguments as well as the return value are objects (just

File pyobjc/Doc/tutorial/tutorial.html

 <p>If you are using Python 2.3 the script is located in <code><span>plat-mac</span></code> instead
 of <code><span>site-packages</span></code> and the command is:</p>
 <pre>
-$ python2.3 $PYLIB/plat-mac/PyObjC/bundlebuilder.py --link --nib=MainMenu \
+$ python2.3 $PYLIB/plat-mac/bundlebuilder.py --link --nib=MainMenu \
         --mainprogram=CurrencyConverter.py --resource=MainMenu.nib build
 </pre>
 <p>There are a few things to note:</p>

File pyobjc/Examples/00ReadMe.html

 <li><a href="TinyTinyEdit">TinyTinyEdit</a><p>A minimal Document-based text editor application.</p>
 </li>
 <li><a href="Todo">Todo</a><p>A more complex NIB based applications. This is a document-based application.
-The code is a translation into pyton of an example project in 
+The code is a translation into Python of an example project in 
 'Learning Cocoa' from O'Reilly</p>
 </li>
-<li><a href="WebServicesTool">WebServicesTool</a><p>Another Project Builder Cocoa project.  Quiries an XML-RPC enabled web
+<li><a href="WebServicesTool">WebServicesTool</a><p>Another Project Builder Cocoa project.  Queries an XML-RPC enabled web
 server for the methods that it implements.  Demonstrates a more advanced
 use of an NSTableView, how to make a toolbar as well as how to use
 multi-threading.</p>
 <p>The application calculates the field pattern and RMS field of an antenna 
 array with up to three elements.</p>
 </li>
-<li><a href="PyInterpreter">PyInterpreter</a><p>A full featured embedded Python interpreter.  This demonstrates more complicated uses of NSTextView, manual event dispatching, and the new text completion feature of OS X 10.3.</p>
+<li><a href="PyInterpreter">PyInterpreter</a><p>A full featured embedded Python interpreter.  This demonstrates
+more complicated uses of NSTextView, manual event dispatching,
+and the new text completion feature of OS X 10.3.</p>
+</li>
+<li><a href="OpenGLDemo">OpenGLDemo</a><p>A simple program that shows how to use OpenGL in a Cocoa program.  It is a 
+port of Apple's &quot;CocoaGL&quot; example.  Note that this requires <a href="http://pyopengl.sourceforge.net/">PyOpenGL</a> to 
+be installed.</p>
+</li>
+<li><a href="SillyBallsSaver">SillyBallsSaver</a><p>A simple screensaver written in Python. This example requires a framework
+install of Python, that is either MacOS X 10.3 or a MacPython 2.3 
+installation.</p>
+</li>
+<li>Twisted/WebServicesTool<p>Shows how to integrate Twisted (1.1 or later) with Cocoa, it is a
+refactor of the WebServicesTool example that is made much simpler
+by using Twisted.</p>
+</li>
+<li>Twisted/WebServicesTool-ControllerLayer<p>Shows how to integrate Twisted (1.1 or later) with Cocoa, it is a
+refactor of the WebServicesTool example that is made much simpler
+by using Twisted as it does not need threads. This one also uses
+NSController and therefore requires MacOS X 10.3.</p>
 </li>
 </ul>
 </body>

File pyobjc/Installer Package/10.2/ReadMe.html

+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+Welcome to PyObjC</title>
+</head>
+<body>
+<h2>Welcome to PyObjC</h2>
+<p>The PyObjC package provides the glue needed to interface the Python interpreter
+with the Objective-C language. At its core is the <code><span>objc</span></code> module makes 
+Objective-C objects and classes available as first-class Python citizens. It is 
+not only possible to use Objective-C objects but you can also subclass 
+Objective-C classes.</p>
+<p>To make it easier to use the core <code><span>objc</span></code> module, this package also provides 
+a number of modules that are wrappers for the Cocoa frameworks, such as
+Foundation and AppKit. These modules not only give you access to the classes in
+these frameworks but also to the functions and constants in those modules.</p>
+<p>To install this package double-click on <code><span>PyObjC.pkg</span></code>. This will install the
+PyObjC python package and some Project Builder templates. The documentation
+and examples are found in  the folder <code><span>PyObjC</span> <span>Documentation</span> <span>and</span> <span>Examples</span></code>. 
+Install these by dragging this folder to you disk, <code><span>/Library/Documentation</span></code>
+is a suitable location.</p>
+<p>NOTE: This installer package is for MacOS X 10.2 with the Python 2.2 supplied
+by Apple. There is a seperate installer for MacOS X 10.3. If you use 
+MacPython 2.3 on MacOS X 10.2 you should use the <code><span>Package</span> <span>Manager</span></code> 
+application to install PyObjC. In other situation you can install PyObjC from 
+the source archive.</p>
+</body>
+</html>

File pyobjc/Installer Package/10.2/ReadMe.txt

+=================
+Welcome to PyObjC
+=================
+
+The PyObjC package provides the glue needed to interface the Python interpreter
+with the Objective-C language. At its core is the ``objc`` module makes 
+Objective-C objects and classes available as first-class Python citizens. It is 
+not only possible to use Objective-C objects but you can also subclass 
+Objective-C classes.
+
+To make it easier to use the core ``objc`` module, this package also provides 
+a number of modules that are wrappers for the Cocoa frameworks, such as
+Foundation and AppKit. These modules not only give you access to the classes in
+these frameworks but also to the functions and constants in those modules.
+
+To install this package double-click on ``PyObjC.pkg``. This will install the
+PyObjC python package and some Project Builder templates. The documentation
+and examples are found in  the folder ``PyObjC Documentation and Examples``. 
+Install these by dragging this folder to you disk, ``/Library/Documentation``
+is a suitable location.
+
+NOTE: This installer package is for MacOS X 10.2 with the Python 2.2 supplied
+by Apple. There is a seperate installer for MacOS X 10.3. If you use 
+MacPython 2.3 on MacOS X 10.2 you should use the ``Package Manager`` 
+application to install PyObjC. In other situation you can install PyObjC from 
+the source archive.

File pyobjc/Installer Package/10.2/Resources/Description.plist

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IFPkgDescriptionDeleteWarning</key>
+	<string></string>
+	<key>IFPkgDescriptionDescription</key>
+	<string>See http://pyobjc.sourceforge.net/ for the latest news and information.
+
+The ObjC package provides the glue needed to interface the Python interpreter with the Objective-C language. The 'objc' module makes Objective-C objects and classes available as first-class Python citizens, it is not only possible to use Objective-C objects but you can also subclass Objective-C classes.
+
+The package also includes support for the Foundation, AppKit, WebKit and AddressBook frameworks.   As a result, it is possible to build complete Cocoa applications entirely in Python.
+
+The package also includes project templates from which the developer can create new Cocoa projects implemented in Python.
+
+Must be installed on boot volume.
+</string>
+	<key>IFPkgDescriptionTitle</key>
+	<string>PyObjC</string>
+	<key>IFPkgDescriptionVersion</key>
+	<string>@@VERSION@@</string>
+</dict>
+</plist>

File pyobjc/Installer Package/10.2/Resources/English.lproj/InstallationCheck.strings

+"16" = "Your system is too old, need at least Mac OS X 10.2 to install";
+"17" = "Your system is too new, need a Mac OS X 10.2.x system to install";

File pyobjc/Installer Package/10.2/Resources/InstallationCheck

+#!/bin/sh
+
+FAIL=96
+MSG_TOO_OLD=16	# Pre-Jaguar
+MSG_TOO_NEW=17	# Post-Jaguar
+
+if [ -d /usr/bin/sw_vers ]; then
+	VER=`/usr/bin/sw_vers | grep ProductVersion: | awk '{ print $2 }'`
+	echo $VER
+else
+	VER=`awk 'BEGIN { have_match=0; }
+		/ProductVersion/ { have_match = 1; next }
+		{ if (have_match) { gsub(/<[^>]*>/, ""); print $1; exit 0 } }' /System/Library/CoreServices/SystemVersion.plist`
+fi
+
+case $VER in
+10.0|10.1|10.0.*|10.1.*)
+	exit `expr $FAIL + $MSG_TOO_OLD`
+	;;
+
+10.2|10.2.*)
+	exit 0
+	;;
+*)
+	exit `expr $FAIL + $MSG_TOO_NEW`
+	;;
+esac

File pyobjc/Installer Package/10.2/Resources/License.txt

+(This is the MIT license)
+
+Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File pyobjc/Installer Package/10.2/Resources/ReadMe.txt

+The PyObjC package provides the glue needed to interface the Python interpreter with the Objective-C language. The 'objc' module makes Objective-C objects and classes available as first-class Python citizens, it is not only possible to use Objective-C objects but you can also subclass Objective-C classes.
+
+This package also installs modules that provide convenient access to (most of)
+the Foundation, AppKit, WebKit and AddressBook frameworks. This makes it easy 
+to build Cocoa applications in Python. 
+
+Other than the python modules the installer also installs Project Builder templates (in /Developer/ProjectBuilder Extras/Project Templates)
+
+The latest information can always be found at:
+
+    http://pyobjc.sourceforge.net/
+
+b.bum                   Ronald Oussoren
+bbum@codefab.com        oussoren@cistron.nl

File pyobjc/Installer Package/10.2/Resources/postflight

+#!/bin/sh
+
+# This is MacOS X 10.2 specific
+
+if [ ! -d /usr/local/bin/. ]; then
+	mkdir -p /usr/local/bin
+fi
+
+cp /usr/lib/python2.2/site-packages/PyObjC/bin/* /usr/local/bin
+if [ $? != 0 ]; then
+	echo "Could not move scripts to the correct location"
+	exit 1
+fi
+
+rm -r /usr/lib/python2.2/site-packages/PyObjC/bin
+if [ $? != 0 ]; then
+	echo "Could not move scripts to the correct location [2]"
+	exit 1
+fi
+
+exit 0

File pyobjc/Installer Package/10.2/Resources/preflight

+#!/bin/sh
+
+# Make sure 0.8 and 0.7 are removed completely.  In the future,
+# the package will auto update previous versions.
+
+rm -rf "/Developer/ProjectBuilder Extras/Project Templates/Application/Cocoa-Python Application"
+
+rm -rf "/Developer/Examples/PyObjC"
+
+rm -rf "/Library/Receipts/PyObjC-0.8.pkg"
+rm -rf "/Library/Receipts/PyObjC 0.7.0.pkg"
+
+# Versions of PyObjC before 0.9 installed python files in the site-packages
+# directory, from 0.9 onwards we install in site-packages/PyObjC.
+
+for dn in AddressBook AppKit Foundation autoGil.so objc
+do
+	rm -rf "/usr/lib/python2.2/site-packages/${dn}"
+done
+
+# Clean up any previous install in /usr/lib/python2.2/site-packages/PyObjC.
+# The new release might include fewer files than the previous one.
+rm -rf /usr/lib/python2.2/site-packages/PyObjC
+
+# Likewise for PB templates and documentation
+rm -rf "/Developer/ProjectBuilder Extras/Project Templates/Application/Cocoa-Python Application"
+rm -rf "/Developer/ProjectBuilder Extras/Project Templates/Application/Cocoa-Python Documented-based Application"
+rm -rf "/Developer/ProjectBuilder Extras/Project Templates/Application/Cocoa-Python-ObjC Documented-based Application"
+rm -rf "/Developer/ProjectBuilder Extras/Project Templates/Application/Cocoa-Python-ObjC Application"
+rm -rf /Library/Developer/Documentation/PyObjC
+rm -rf /Library/Developer/Examples/PyObjC
+
+exit 0

File pyobjc/Installer Package/10.3/ReadMe.html

+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<title>
+Welcome to PyObjC</title>
+</head>
+<body>
+<h2>Welcome to PyObjC</h2>
+<p>The PyObjC package provides the glue needed to interface the Python interpreter
+with the Objective-C language. At its core is the <code><span>objc</span></code> module makes 
+Objective-C objects and classes available as first-class Python citizens. It is 
+not only possible to use Objective-C objects but you can also subclass 
+Objective-C classes.</p>
+<p>To make it easier to use the core <code><span>objc</span></code> module, this package also provides 
+a number of modules that are wrappers for the Cocoa frameworks, such as
+Foundation and AppKit. These modules not only give you access to the classes in
+these frameworks but also to the functions and constants in those modules.</p>
+<p>To install this package double-click on <code><span>PyObjC.pkg</span></code>. This will install the
+PyObjC python package and some Project Builder templates. The documentation
+and examples are found in  the folder <code><span>PyObjC</span> <span>Documentation</span> <span>and</span> <span>Examples</span></code>. 
+Install these by dragging this folder to you disk, <code><span>/Library/Documentation</span></code>
+is a suitable location.</p>
+<p>NOTE: This installer package is for MacOS X 10.3. There is a seperate installer
+for MacOS X 10.2 with the Python 2.2 supplied by Apple. If you use 
+MacPython 2.3 on MacOS X 10.2 you should use the <code><span>Package</span> <span>Manager</span></code> 
+application to install PyObjC. In other situation you can install PyObjC from 
+the source archive.</p>
+</body>
+</html>

File pyobjc/Installer Package/10.3/ReadMe.txt

+=================
+Welcome to PyObjC
+=================
+
+The PyObjC package provides the glue needed to interface the Python interpreter
+with the Objective-C language. At its core is the ``objc`` module makes 
+Objective-C objects and classes available as first-class Python citizens. It is 
+not only possible to use Objective-C objects but you can also subclass 
+Objective-C classes.
+
+To make it easier to use the core ``objc`` module, this package also provides 
+a number of modules that are wrappers for the Cocoa frameworks, such as
+Foundation and AppKit. These modules not only give you access to the classes in
+these frameworks but also to the functions and constants in those modules.
+
+To install this package double-click on ``PyObjC.pkg``. This will install the
+PyObjC python package and some Project Builder templates. The documentation
+and examples are found in  the folder ``PyObjC Documentation and Examples``. 
+Install these by dragging this folder to you disk, ``/Library/Documentation``
+is a suitable location.
+
+NOTE: This installer package is for MacOS X 10.3. There is a seperate installer
+for MacOS X 10.2 with the Python 2.2 supplied by Apple. If you use 
+MacPython 2.3 on MacOS X 10.2 you should use the ``Package Manager`` 
+application to install PyObjC. In other situation you can install PyObjC from 
+the source archive.

File pyobjc/Installer Package/10.3/Resources/Description.plist

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>IFPkgDescriptionDeleteWarning</key>
+	<string></string>
+	<key>IFPkgDescriptionDescription</key>
+	<string>See http://pyobjc.sourceforge.net/ for the latest news and information.
+
+The ObjC package provides the glue needed to interface the Python interpreter with the Objective-C language. The 'objc' module makes Objective-C objects and classes available as first-class Python citizens, it is not only possible to use Objective-C objects but you can also subclass Objective-C classes.
+
+The package also includes support for the Foundation, AppKit, WebKit and AddressBook frameworks.   As a result, it is possible to build complete Cocoa applications entirely in Python.
+
+The package also includes project templates from which the developer can create new Cocoa projects implemented in Python.
+
+Must be installed on boot volume.
+</string>
+	<key>IFPkgDescriptionTitle</key>
+	<string>PyObjC</string>
+	<key>IFPkgDescriptionVersion</key>
+	<string>@@VERSION@@</string>
+</dict>
+</plist>

File pyobjc/Installer Package/10.3/Resources/English.lproj/InstallationCheck.strings

+"16" = "Your system is too old, need at least Mac OS X 10.3 to install";
+"17" = "Your system is too new, need a Mac OS X 10.3.x system to install";

File pyobjc/Installer Package/10.3/Resources/InstallationCheck

+#!/bin/sh
+
+FAIL=96
+MSG_TOO_OLD=16	# Pre-Panther
+MSG_TOO_NEW=17	# Post-Panther
+
+if [ -d /usr/bin/sw_vers ]; then
+	VER=`/usr/bin/sw_vers | grep ProductVersion: | awk '{ print $2 }'`
+	echo $VER
+else
+	VER=`awk 'BEGIN { have_match=0; }
+		/ProductVersion/ { have_match = 1; next }
+		{ if (have_match) { gsub(/<[^>]*>/, ""); print $1; exit 0 } }' /System/Library/CoreServices/SystemVersion.plist`
+fi
+
+case $VER in
+10.0|10.1|10.0.*|10.1.*|10.2|10.2.*)
+	exit `expr $FAIL + $MSG_TOO_OLD`
+	;;
+
+10.3|10.3.*)
+	exit 0
+	;;
+
+*)
+	exit `expr $FAIL + $MSG_TOO_NEW`
+	;;
+esac

File pyobjc/Installer Package/10.3/Resources/License.txt

+(This is the MIT license)
+
+Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al.
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

File pyobjc/Installer Package/10.3/Resources/ReadMe.txt

+The PyObjC package provides the glue needed to interface the Python interpreter with the Objective-C language. The 'objc' module makes Objective-C objects and classes available as first-class Python citizens, it is not only possible to use Objective-C objects but you can also subclass Objective-C classes.
+
+This package also installs modules that provide convenient access to (most of)
+the Foundation, AppKit, WebKit and AddressBook frameworks. This makes it easy 
+to build Cocoa applications in Python. 
+
+Other than the python modules the installer also installs Project Builder templates (in /Developer/ProjectBuilder Extras/Project Templates)
+
+The latest information can always be found at:
+
+    http://pyobjc.sourceforge.net/
+
+b.bum                   Ronald Oussoren
+bbum@codefab.com        oussoren@cistron.nl

File pyobjc/Installer Package/10.3/Resources/postflight

+#!/bin/sh
+
+# This is MacOS X 10.3 specific, and a hack
+
+if [ ! -d /usr/local/bin/. ]; then
+	mkdir -p /usr/local/bin
+fi
+
+cp /Library/Python/2.3/PyObjC/bin/* /usr/local/bin
+if [ $? != 0 ]; then
+	echo "Could not move scripts to the correct location"
+	exit 1
+fi
+
+rm -r /Library/Python/2.3/PyObjC/bin
+if [ $? != 0 ]; then
+	echo "Could not move scripts to the correct location [2]"
+	exit 1
+fi
+
+exit 0

File pyobjc/Installer Package/10.3/Resources/preflight

+#!/bin/sh
+
+# Clean up any previous installs
+# The new release might include fewer files than the previous one.
+rm -rf /Library/Python/2.3/PyObjC
+
+# Likewise for PB templates and documentation
+rm -rf "/Library/Application Support/Apple/Developer Tools/Project Templates/Application/Cocoa-Python Application"
+rm -rf "/Library/Application Support/Apple/Developer Tools/Project Templates/Application/Cocoa-Python Documented-based Application"
+rm -rf "/Library/Application Support/Apple/Developer Tools/Project Templates/Application/Cocoa-Python-ObjC Documented-based Application"
+rm -rf "/Library/Application Support/Apple/Developer Tools/Project Templates/Application/Cocoa-Python-ObjC Application"
+
+exit 0

File pyobjc/Lib/SecurityInterface/__init__.py

+"""
+Python mapping for the SecurityInterface framework on MacOS X >= 10.3
+
+This module does not contain docstrings for the wrapped code, check Apple's
+documentation for details on how to use these functions and classes.
+"""
+
+# Load the SecurityInterface bundle, and gather all classes defined there
+import objc
+
+# For some reason SecurityFoundation.framework is currently documented as being
+# part of SecurityInterface.
+objc.loadBundle("SecurityInterface", globals(), bundle_path="/System/Library/Frameworks/SecurityFoundation.framework")
+
+objc.loadBundle("SecurityInterface", globals(), bundle_path="/System/Library/Frameworks/SecurityInterface.framework")
+
+from _SecurityInterface import *
+del _SecurityInterface, objc
+
+import protocols  # no need to export these, just register with PyObjC
+
+# Define useful utility methods here

File pyobjc/Lib/SecurityInterface/protocols.py

+# generated from '/System/Library/Frameworks/SecurityInterface.framework'
+import objc as _objc
+
+
+SFAuthorizationViewDelegate = _objc.informal_protocol(
+    "SFAuthorizationViewDelegate",
+    [
+# (void)authorizationViewCreatedAuthorization:(SFAuthorizationView *)view
+        _objc.selector(
+            None,
+            selector='authorizationViewCreatedAuthorization:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)authorizationViewDidAuthorize:(SFAuthorizationView *)view
+        _objc.selector(
+            None,
+            selector='authorizationViewDidAuthorize:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)authorizationViewDidDeauthorize:(SFAuthorizationView *)view
+        _objc.selector(
+            None,
+            selector='authorizationViewDidDeauthorize:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (void)authorizationViewReleasedAuthorization:(SFAuthorizationView *)view
+        _objc.selector(
+            None,
+            selector='authorizationViewReleasedAuthorization:',
+            signature='v@:@',
+            isRequired=0,
+        ),
+# (BOOL)authorizationViewShouldDeauthorize:(SFAuthorizationView *)view
+        _objc.selector(
+            None,
+            selector='authorizationViewShouldDeauthorize:',
+            signature='c@:@',
+            isRequired=0,
+        ),
+    ]
+)
+

File pyobjc/Lib/SecurityInterface/test/__init__.py

Empty file added.

File pyobjc/Lib/SecurityInterface/test/test_loaded.py

+"""
+SecurityInterface doesn't add 'interesting' behaviour, just check that the 
+module loaded correctly.
+"""
+
+import unittest
+
+import os
+
+if os.path.exists('/System/Library/Frameworks/SecurityInterface.framework'):
+    import objc
+
+
+    class SITest (unittest.TestCase):
+        def testClasses(self):
+            # Check that we loaded the SecurityInterface framework by looking 
+            # for a class that should exist
+            import SecurityInterface 
+
+            self.assert_(hasattr(SecurityInterface, 'SFAuthorizationView'))
+            self.assert_(hasattr(SecurityInterface, 'SFAuthorizationView'))
+
+            self.assert_(isinstance(SecurityInterface.SFAuthorization, objc.objc_class))
+
+            self.assert_(isinstance(SecurityInterface.SFAuthorization, objc.objc_class))
+
+
+if __name__ == "__main__":
+    unittest.main()

File pyobjc/Lib/objc/test/test_imp.py

+import objc
+import unittest
+
+class TestBasicIMP (unittest.TestCase):
+    # Test the basic functionality of IMP's. Imp's are basically unbound
+    # selectors if you look at the interface. The implementation refers to
+    # the actual functions that implements the method for calling the IMP
+    # instead of passing through the usual message sending machinery.
+    #
+    def testIMPType(self):
+        self.assert_(hasattr(objc, "IMP"))
+
+    def testAlloc(self):
+        cls = objc.runtime.NSObject
+        m = cls.pyobjc_classMethods.methodForSelector_("alloc")
+        self.assert_(isinstance(m, objc.IMP))
+        self.assert_(m.isClassMethod)
+        self.assertEquals(m.isAlloc, cls.alloc.isAlloc)
+        self.assertEquals(m.doesDonateReference, cls.alloc.doesDonateReference)
+        self.assertEquals(m.returnsSelf, cls.alloc.returnsSelf)
+        self.assertEquals(m.selector, 'alloc')
+
+        o = m(cls).init()
+        self.assert_(isinstance(o, cls))
+
+    def testInit1(self):
+        cls = objc.runtime.NSObject
+        m = cls.instanceMethodForSelector_("init")
+        self.assert_(isinstance(m, objc.IMP))
+        self.assert_(not m.isClassMethod)
+        self.assertEquals(m.isAlloc, cls.init.isAlloc)
+        self.assertEquals(m.doesDonateReference, cls.init.doesDonateReference)
+        self.assertEquals(m.returnsSelf, cls.init.returnsSelf)
+        self.assertEquals(m.selector, 'init')
+
+        o = m(cls.alloc())
+        self.assert_(isinstance(o, cls))
+
+    def testInit2(self):
+        cls = objc.runtime.NSObject
+        o = cls.alloc().init()
+
+        m = o.methodForSelector_("init")
+        self.assert_(isinstance(m, objc.IMP))
+        self.assert_(not m.isClassMethod)
+        self.assertEquals(m.isAlloc, cls.init.isAlloc)
+        self.assertEquals(m.doesDonateReference, cls.init.doesDonateReference)
+        self.assertEquals(m.returnsSelf, cls.init.returnsSelf)
+        self.assertEquals(m.selector, 'init')
+
+        o = m(cls.alloc())
+        self.assert_(isinstance(o, cls))
+
+    def testDescription(self):
+        o = objc.runtime.NSObject.alloc().init()
+
+        self.assertEquals(o.description(), o.methodForSelector_('description')(o))
+
+
+
+
+if __name__ == "__main__":
+    unittest.main()

File pyobjc/Modules/SecurityInterface/_SecurityInterface.m

+/*
+ * Mapping of static items in the AddressBook framework
+ */
+#include <Python.h>
+
+#import <SecurityInterface/SFAuthorizationView.h>
+#import <SecurityInterface/SFChooseIdentityPanel.h>
+#import <SecurityInterface/SFCertificatePanel.h>
+#import <SecurityInterface/SFKeychainSavePanel.h>
+#import <SecurityInterface/SFCertificateTrustPanel.h>
+#import <SecurityInterface/SFKeychainSettingsPanel.h>
+#import <SecurityInterface/SFCertificateView.h>
+
+#import <CoreFoundation/CoreFoundation.h>
+
+#include "pyobjc-api.h"
+#include "wrapper-const-table.h"
+
+static PyMethodDef sec_methods[] = {
+	{ 0, 0, 0, 0 }
+};
+
+
+PyDoc_STRVAR(sec_doc,
+"Cocoa._SecurityInterface defines constants, types and global functions used by "
+"Cocoa.SecurityInterface."
+);
+
+
+#include "_SecInt_Enum.inc"
+#include "_SecInt_Str.inc"
+
+void init_SecurityInterface(void);
+void init_SecurityInterface(void)
+{
+	PyObject *m, *d;
+	CFBundleRef bundle;
+
+	m = Py_InitModule4("_SecurityInterface", sec_methods, 
+		sec_doc, NULL, PYTHON_API_VERSION);
+	if (!m) return;
+
+	d = PyModule_GetDict(m);
+	if (!d) return;
+
+	if (PyObjC_ImportAPI(m) < 0) {
+		return;
+	}
+
+	bundle = CFBundleCreate(NULL,
+		(CFURLRef)[NSURL fileURLWithPath:@"/System/Library/Frameworks/SecurityInterface.framework"]);
+
+
+	if (register_ints(d, enum_table) < 0) return;
+	if (register_variableList(d, bundle, string_table, 
+		(sizeof(string_table)/sizeof(string_table[0])-1)) < 0) return;
+
+	//CFRelease(bundle);
+}

File pyobjc/Modules/objc/libffi_support.m

 			}
 			Py_DECREF(res);
 			if (err == -1) {
+				if (res == Py_None) {
+					PyErr_Format(PyExc_ValueError,
+					   "%s: returned None, expecting "
+					   "a value", 
+					   PyObjCRT_SELName(*(SEL*)args[1]));
+				}
 				goto error;
 			}
 		}
 			    [[(*(id*)resp) retain] autorelease];
 			}
 			if (err == -1) {
-				Py_DECREF(res);
+				if (real_res == Py_None) {
+					PyErr_Format(PyExc_ValueError,
+					   "%s: returned None, expecting "
+					   "a value",
+					   PyObjCRT_SELName(*(SEL*)args[1]));
+				}
+				Py_DECREF(res); /* XXX */
 				goto error;
 			}
 		}

File pyobjc/Modules/objc/objc-object.m

 	return res;
 }
 
+#if 0 /* No longer used */
 PyDoc_STRVAR(obj_get_classMethods_doc,
 "The attributes of this field are the class methods of this object. This can\n"
 "be used to force access to a class method."
 {
 	return ObjCMethodAccessor_New((PyObject*)self, 1);
 }
+#endif
 
 PyDoc_STRVAR(obj_get_instanceMethods_doc,
 "The attributes of this field are the instance methods of this object. This\n"

File pyobjc/Modules/objc/objc_support.m

 	default:
 		PyErr_Format(ObjCExc_error, 
 			"pythonify_c_value: unhandled value type (%c|%d|%s)",
-			*type, *type, *type);
+			*type, *type, type);
 		break;
 	}
 
 
 		if (PyString_Check(argument) || PyUnicode_Check(argument)) {
 			PyErr_Format(PyExc_ValueError,
-				"depythonifying '%s', got '%s' of %d",
+				"depythonifying '%s', got '%s'",
 					descr,
-					argument->ob_type->tp_name,
-					PyString_Size(argument));
+					argument->ob_type->tp_name);
 			return -1;
 		}
 
 		}
 
 		PyErr_Format(PyExc_ValueError,
-			"depythonifying '%s', got '%s' of %d",
+			"depythonifying '%s', got '%s'",
 				descr,
-				argument->ob_type->tp_name,
-				PyString_Size(argument));
+				argument->ob_type->tp_name);
 		return -1;
 	}
 }

File pyobjc/Modules/objc/pyobjc.h

  * Central include file for PyObjC. 
  */
 
-#define OBJC_VERSION "1.0+"
+#define OBJC_VERSION "1.1a0"
 
 #include <Python.h>
 #include "structmember.h"

File pyobjc/Modules/objc/selector.m

 	if (self->callable == NULL) {
 		PyErr_Format(PyExc_TypeError, 
 			"Calling abstract methods with selector %s",
-			self->sel_selector);
+			PyObjCRT_SELName(self->sel_selector));
 		return NULL;
 	}
 

File pyobjc/Modules/objc/super-call.m

 	repr = PyObject_Repr(self);
 	if (repr == NULL || !PyString_Check(repr)) {
 		Py_XDECREF(repr);
-		PyErr_Format(
+		PyErr_Format(PyExc_TypeError,
 			"Cannot call '%s' on instances of '%s' from Python",
 			PyObjCRT_SELName(PyObjCSelector_GetSelector(meth)),
 			self->ob_type->tp_name);

File pyobjc/Scripts/CodeGenerators/enum_generator.py

                     in_comment = 1
                     ln = ln[:m.start()]
 
-                if need_brace == 1:
+                if need_brace:
                     if not ln.strip().startswith('{'):
                         in_enum=0
                         continue
+                    need_brace = 0
 
 
                 m = IDENT_RE.search(ln)

File pyobjc/Scripts/buildpkg.py

 
         # find candidate resource files (txt html rtf rtfd/ or lproj/)
         allFiles = []
-        for pat in string.split("*.txt *.html *.rtf *.rtfd *.lproj", " "):
+        for pat in string.split("*.txt *.html *.rtf *.rtfd *.lproj *.plist", " "):
             pattern = join(self.resourceFolder, pat)
             allFiles = allFiles + glob.glob(pattern)
 
                     files.append((f, f))
             if f[-6:] == ".lproj":
                 files.append((f, f))
+            elif f[-6:] == ".plist":
+                files.append((f, f))
             elif basename(f) in ["pre_upgrade", "pre_install", "post_upgrade", "post_install"]:
                 files.append((f, packageName+"."+basename(f)))
             elif basename(f) in ["preflight", "postflight", "InstallationCheck"]:

File pyobjc/Scripts/gen_all_protocols.py

         "Foundation", 
         "AddressBook", 
         "InterfaceBuilder", 
-        #"SecurityInterface" 
       ]:
     path = "/System/Library/Frameworks/%s.framework" % framework
     protfile = file(os.path.join(libdir, framework, "protocols.py"), "w")
 
     print "generating protocols for", framework
     genProtocols(path, protfile)
+
+if os.path.isdir('/System/Library/Frameworks/SecurityInterface.framework'):
+    framework = 'SecurityInterface'
+    path = "/System/Library/Frameworks/%s.framework" % framework
+    protfile = file(os.path.join(libdir, framework, "protocols.py"), "w")
+    print "generating protocols for", framework
+    genProtocols(path, protfile, SPECIALS.get(framework, {}), 'SFAuthorizationView')

File pyobjc/Scripts/gen_protocols.py

 tempSource = "_makeTypeCodes.m"
 tempExecutable = "_makeTypeCodes"
 
-def makeTypeCodes(frameworkName, types):
+def makeTypeCodes(frameworkName, types, frameworkMain=None):
+    if frameworkMain is None:
+        frameworkMain = frameworkName
     lines = []
     keys = types.keys()
     keys.sort()
     for tp in keys:
         lines.append("m = @encode(%s);" % tp)
         lines.append(r'printf("%%s %s\n", m);' % tp)
-    source = template % (frameworkName, frameworkName, "\n    ".join(lines))
+    source = template % (frameworkName, frameworkMain, "\n    ".join(lines))
     file(tempSource, "w").write(source)
     if os.system("cc -o %s %s" % (tempExecutable, tempSource)):
         assert 0, "compile failed"
     os.remove(tempExecutable)
 
 
-def genProtocols(frameworkPath, outFile=None, specials={}):
+def genProtocols(frameworkPath, outFile=None, specials={}, frameworkMain=None):
     """Generate protocol definitions for a framework. If outFile is None,
     the generated Python code will be printed to sys.stdout.
     """
             for sel, types, line, isClass in selectors:
                 for tp in types:
                     allTypes[tp] = 0
-    makeTypeCodes(frameworkName, allTypes)
+    makeTypeCodes(frameworkName, allTypes, frameworkMain)
     protocols = allProtocols.items()
     protocols.sort()
     print >> outFile, "# generated from %r" % frameworkPath

File pyobjc/Scripts/make_distrib.py

 USAGE='Usage: %s [-p python | --with-python=%s] [-h|--help] [-o release-dir|--output-directory=release-dir]\n'%(
         sys.argv[0], sys.executable)
 
+osvers = os.popen('sw_vers | grep ProductVersion').readline().strip().split()[-1]
+osvers = '.'.join(osvers.split('.')[:2])
+
 PYTHON=sys.executable
 
 def rest2HTML(irrelevant, dirName, names):
 
 print "Generating HTML documentation"
 os.path.walk('Doc', rest2HTML, ['Doc/announcement.txt'])
-rest2HTML(None, '.', ['Install.txt', 'ReadMe.txt', 'Examples/00ReadMe.txt', 'Installer Package/ReadMe.txt', 'ProjectBuilder Extras/Project Templates/00README.txt'])
+rest2HTML(None, '.', ['Install.txt', 'ReadMe.txt', 'Examples/00ReadMe.txt', 'Installer Package/10.2/ReadMe.txt', 'Installer Package/10.3/ReadMe.txt', 'ProjectBuilder Extras/Project Templates/00README.txt'])
 os.rename('ProjectBuilder Extras/Project Templates/00README.html', 'Doc/ProjectBuilder-Templates.html')
 
 if DOC_ONLY:
 for ln in fd.xreadlines():
         sys.stdout.write(ln)
 
-
+#
+# NOTE: We first install our scripts into the python tree and later on move
+# them to /usr/local to avoid clobbering a /usr/local symlink installed by
+# the user.
 print "Running: '%s' setup.py install --prefix='%s/package%s' --install-scripts=%s/package%s/lib/python%s/site-packages/PyObjC/bin"%(
         escquotes(PYTHON), escquotes(BUILDDIR), escquotes(basedir), escquotes(BUILDDIR), escquotes(basedir), PYTHONVER)
 fd = os.popen("'%s' setup.py install --prefix='%s/package%s' --install-scripts=%s/package%s/lib/python%s/site-packages/PyObjC/bin"%(
 for ln in fd.xreadlines():
         sys.stdout.write(ln)
 
+if osvers != '10.2':
+    # Move the python packages into the right location, 'site-packages' is a
+    # symlink on Panther and we don't want to clobber that.
+    makeDir(BUILDDIR, 'package', 'Library', 'Python', str(PYTHONVER))
+    os.rename(
+        '%s/package%s/lib/python%s/site-packages/PyObjC'%(BUILDDIR, basedir, PYTHONVER),
+        '%s/package/Library/Python/%s/PyObjC'%(BUILDDIR, PYTHONVER))
+    os.rename(
+        '%s/package%s/lib/python%s/site-packages/PyObjC.pth'%(BUILDDIR, basedir, PYTHONVER),
+        '%s/package/Library/Python/%s/PyObjC.pth'%(BUILDDIR, PYTHONVER))
+
 print "Copying readme and license"
-shutil.copyfile("Installer Package/ReadMe.html", os.path.join(OUTPUTDIR, "ReadMe First.html"))
+shutil.copyfile("Installer Package/%s/ReadMe.html"%(osvers,), os.path.join(OUTPUTDIR, "ReadMe First.html"))
 shutil.copyfile("License.txt", os.path.join(OUTPUTDIR, "License.txt"))
 
-print "Setting up developer templates"
 
+print "Building installer for %s"%(osvers,)
 nastyFiles = ['.DS_Store', '.gdb_history']
 
 def killNasties(irrelevant, dirName, names):
         for aName in names:
                 if aName in nastyFiles:
                         os.remove( os.path.join(dirName, aName) )
-        if dirName.find(".pbproj") > 0:
+        if dirName.find(".pbproj") > 0 and dirName.find('.xcode') > 0:
                 for aName in names:
                         if aName.find(".pbxuser") > 0:
                                 os.remove( os.path.join(dirName, aName) )
 
 basedir = '%s/package'%(BUILDDIR)
 
-makeDir(basedir, 'Developer', 'ProjectBuilder Extras', 'Project Templates', 'Application')
-templateDestination = os.path.join(basedir, 'Developer', 'ProjectBuilder Extras',
-                                   'Project Templates', 'Application')
 
-templateDir = os.path.join('ProjectBuilder Extras', 'Project Templates')
-for dname in os.listdir(templateDir):
-    if dname == 'CVS': continue
-    path = os.path.join(templateDir, dname)
-    if not os.path.isdir(path): continue
-    shutil.copytree(path, os.path.join(templateDestination, dname))
+if osvers == '10.2':
+    print "Setting up Project Builder templates"
+    makeDir(basedir, 'Developer', 'ProjectBuilder Extras', 'Project Templates', 'Application')
+    templateDestination = os.path.join(basedir, 
+            'Developer', 'ProjectBuilder Extras', 
+            'Project Templates', 'Application')
 
-print "Setting up project builder Python language specifications"
-makeDir(basedir, 'Developer', 'ProjectBuilder Extras')
-pbxSpecificationsDestination = os.path.join(basedir, 'Developer', 'ProjectBuilder Extras', 'Specifications')
-shutil.copytree(os.path.join('ProjectBuilder Extras','Specifications'), pbxSpecificationsDestination)
+    templateDir = os.path.join('ProjectBuilder Extras', 'Project Templates')
+    for dname in os.listdir(templateDir):
+        if dname == 'CVS': continue
+        path = os.path.join(templateDir, dname)
+        if not os.path.isdir(path): continue
+        shutil.copytree(path, os.path.join(templateDestination, dname))
+
+    print "Setting up Project Builder Python language specifications"
+    makeDir(basedir, 'Developer', 'ProjectBuilder Extras')
+    pbxSpecificationsDestination = os.path.join(basedir, 'Developer', 'ProjectBuilder Extras', 'Specifications')
+    shutil.copytree(os.path.join('ProjectBuilder Extras','Specifications'), pbxSpecificationsDestination)
+
+elif osvers == '10.3':
+    print "Setting up Xcode templates"
+    makeDir(basedir, 
+            'Library', 'Application Support', 'Apple', 
+            'Developer Tools', 'Project Templates')
+    templateDestination = os.path.join(basedir, 
+            'Library', 'Application Support', 'Apple', 
+            'Developer Tools', 'Project Templates')
+    templateDir = os.path.join('Xcode', 'Project Templates')
+    for dname in os.listdir(templateDir):
+        if dname == 'CVS': continue
+        path = os.path.join(templateDir, dname)
+        if not os.path.isdir(path): continue
+        shutil.copytree(path, os.path.join(templateDestination, dname))
+
+else:
+    raise ValueError, "Don't know how to build installer for %s"%(osvers,)
 
 print "Setting up developer examples & documentation"
 
 os.path.walk(docsDestination, killNasties, None)
 os.path.walk(docsDestination, rest2HTML, None)
 
+
+
 print 'Building package'
 pm = buildpkg.PackageMaker('PyObjC', package_version(), 
 """\
 applications.
 """)
 pm.build(os.path.join(basedir), 
-        resources=os.path.join(os.getcwd(), 'Installer Package', 'Resources'),
+        resources=os.path.join(os.getcwd(), 'Installer Package', osvers, 'Resources'),
         OutputDir=os.path.join(os.getcwd(), OUTPUTDIR),
         Version=package_version(),
         NeedsAuthorization="YES",
         Relocatable="NO",
         RootVolumeOnly="YES")
 
+print "Fixing up the installer..."
+fn = os.path.join(OUTPUTDIR, 'PyObjC.pkg', 'Contents', 'Resources', 'Description.plist')
+data = open(fn, 'r').read()
+data = data.replace('@@VERSION@@', package_version())
+open(fn, 'w').write(data)
+
 #
 # build 'objc_extras.tar.gz', and archive containing stuff not included in
 # the binary PackMan installer (which is built manually)

File pyobjc/setup.py

         "-Wno-import",
         #"-O0", "-g",
         #"-Werror",
-        "-O3", "-mcpu=7450", "-maltivec",
+        #"-O3", "-mcpu=7450", "-maltivec",
         ]
 
     OBJC_LDFLAGS=[
 
 
 SecurityInterfacePackages, SecurityInterfaceExtensions = [], []
-#SecurityInterfacePackages, SecurityInterfaceExtensions = \
-#        IfFrameWork('SecurityInterface.framework', [ 'SecurityInterface' ], [
-#            Extension('SecurityInterface._SecurityInterface',
-#                      [ 'Modules/SecurityInterface/_SecurityInterface.m' ],
-#                      extra_compile_args=[
-#                        '-IModules/objc',
-#                      ] + CFLAGS,
-#                      extra_link_args=[
-#                      ] + SECURITY_INTERFACE_LDFLAGS,
-#                      **SecurityInterfaceDepends
-#                      ),
-#        ])
+SecurityInterfacePackages, SecurityInterfaceExtensions = \
+        IfFrameWork('SecurityInterface.framework', [ 'SecurityInterface' ], [
+            Extension('SecurityInterface._SecurityInterface',
+                      [ 'Modules/SecurityInterface/_SecurityInterface.m' ],
+                      extra_compile_args=[
+                        '-IModules/objc',
+                      ] + CFLAGS,
+                      extra_link_args=[
+                      ] + SECURITY_INTERFACE_LDFLAGS,
+                      **SecurityInterfaceDepends
+                      ),
+        ])
 
 PrefPanesPackages, PrefPanesExtensions = \
         IfFrameWork('PreferencePanes.framework', [ 'PreferencePanes' ], [