Commits

Ronald Oussoren committed a21c2a2

- Some documentation cleanups
- Localized Examples/EnvironmentPrefs (English and Dutch)
- __dict__ of 'uninitialized' classes is no longer empty
- Added custom wrappers for NSWindow (-windowRef and -initWithWindowRef:)
- Regenerated wrappers scripts on a system with Safari 1.0 & WebCore SDK,
this adds the constants that are necessary for development using webcore.
NOTE: This means you have to install webcore SDK before building this
version. I have not yet tested if the compiled version works on a system
without Safari 1.0.

  • Participants
  • Parent commits 17627f6

Comments (0)

Files changed (31)

File pyobjc/Doc/TODO

 NOTE: If we don't mind doing this only for Python 2.3 we can use the interface
 defined by PEP 311
 
+NOTE2: The autoGIL is quite usefull, but unless our code gets called from a
+different thread, that does not yet have a Python thread context. This may 
+happen when embedding a PyObjC solution in an existing Cocoa application.
+
 
 Test suite
 ..........
 
 See also `Pickle support`.
 
-Build cleanups
-..............
-
-The contents of MANIFEST are no longer valid. We should move to a generated 
-MANIFEST (using MANIFEST.in).
-
 Known issues
 ............
 
 Another option would be to make the generator script slightly smarter: have
 it emit #if version guards based on the guards found in the header files.
 
-Convenience functions
-.....................
-
-Add function to PyObjCTools that can be used to decode the values returned
-by NSNetService.address()
-
 Access to method implementations
 ................................
 
 Make core bridge more robust w.r.t. order of loading frameworks. You currently
 get incorrect wrappers if you manually load the AppKit.framework and then 
 import AppKit.
+
+Add freelists
+.............
+
+PyObjCSelector objects and (especially) PyObjCObject objects are created on
+a regular basis, we should check if using freelists would speed this up.
+

File pyobjc/Doc/coding-style.html

 <li>Add appropriate ReST style fields to the top of the document as comments:<pre>
 # Author: David Goodger
 # Contact: goodger@users.sourceforge.net
-# Revision: $Revision: 1.10 $
-# Date: $Date: 2003/06/21 18:40:44 $
+# Revision: $Revision: 1.11 $
+# Date: $Date: 2003/06/28 12:57:50 $
 # Copyright: This module has been placed in the public domain.
 </pre>
 </li>

File pyobjc/Examples/00ReadMe.html

 <li>PrefPane<p>Demonstrates how to write an NSPreferencePane, for use in the
 System Preferences application. Requires a framework build of Python.</p>
 </li>
+<li>EnvironmentPrefs<p>Another NSPreferencePane. This one can be used to edit the default environment
+for the current user. It also is a simple example of a localized application.</p>
+</li>
 <li>PythonBrowser<p>A reusable Python object browser, demonstrating the use of NSOutlineView
 as well as how to use an NSWindowController subclass to create a window
 from a menu action.</p>

File pyobjc/Examples/00ReadMe.txt

 
   Demonstrates how to write an NSPreferencePane, for use in the
   System Preferences application. Requires a framework build of Python.
+ 
+- EnvironmentPrefs
+
+  Another NSPreferencePane. This one can be used to edit the default environment
+  for the current user. It also is a simple example of a localized application.
 
 - PythonBrowser
 

File pyobjc/Examples/EnvironmentPrefs/Dutch.lproj/EnvironmentPane.nib/classes.nib

+{
+    IBClasses = (
+        {
+            ACTIONS = {deleteVariable = id; newVariable = id; }; 
+            CLASS = EnvironmentPane; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {deleteButton = id; mainTable = id; }; 
+            SUPERCLASS = NSPreferencePane; 
+        }, 
+        {CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; }, 
+        {
+            CLASS = NSPreferencePane; 
+            LANGUAGE = ObjC; 
+            OUTLETS = {
+                "_firstKeyView" = NSView; 
+                "_initialKeyView" = NSView; 
+                "_lastKeyView" = NSView; 
+                "_window" = NSWindow; 
+            }; 
+            SUPERCLASS = NSObject; 
+        }
+    ); 
+    IBVersion = 1; 
+}

File pyobjc/Examples/EnvironmentPrefs/Dutch.lproj/EnvironmentPane.nib/info.nib

+<?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>IBDocumentLocation</key>
+	<string>176 -101 481 349 0 0 1152 746 </string>
+	<key>IBFramework Version</key>
+	<string>291.0</string>
+	<key>IBOpenObjects</key>
+	<array>
+		<integer>12</integer>
+	</array>
+	<key>IBSystem Version</key>
+	<string>6L60</string>
+</dict>
+</plist>

File pyobjc/Examples/EnvironmentPrefs/Dutch.lproj/EnvironmentPane.nib/objects.nib

Binary file added.

File pyobjc/Examples/EnvironmentPrefs/Dutch.lproj/InfoPlist.strings

+/* Localized versions of Info.plist keys */
+CFBundleName = "Shell Variabelen";
+NSPrefPaneIconLabel = "Shell Variabelen";

File pyobjc/Examples/EnvironmentPrefs/Dutch.lproj/Localizable.strings

+/* No comment provided by engineer. */
+"Cancel" = "Annuleer";
+
+/* No comment provided by engineer. */
+"Cannot save changes" = "Kan niet bewaren";
+
+/* No comment provided by engineer. */
+"Don't Save" = "Bewaar niet";
+
+/* No comment provided by engineer. */
+"It was not possible to save your changes" = "Het is niet gelukt uw veranderingen te bewaren";
+
+/* No comment provided by engineer. */
+"Name exists" = "Naam bestaat al";
+
+/* No comment provided by engineer. */
+"New Value" = "Nieuwe waarde";
+
+/* No comment provided by engineer. */
+"New_Variable_%d" = "Nieuwe_sleutel_%d";
+
+/* No comment provided by engineer. */
+"OK" = "OK";
+
+/* No comment provided by engineer. */
+"Save" = "Bewaar";
+
+/* No comment provided by engineer. */
+"Save changes?" = "Veranderingen bewaren?";
+
+/* No comment provided by engineer. */
+"The name %s is already used" = "The name %s is already used";
+
+/* No comment provided by engineer. */
+"There are unsaved changed, should these be saved?" = "Er zijn nog niet bewaarde wijzingen, moeten dezen bewaard worden?";
+

File pyobjc/Examples/EnvironmentPrefs/buildplugin.py

     mainmodule = "main.py",
     nibname = "EnvironmentPane",
     principalClass = "EnvironmentPane",
-    resources = ["English.lproj", "ShellEnv.icns"],
+    resources = ["English.lproj", "Dutch.lproj", "ShellEnv.icns"],
     bundlesuffix = ".prefPane",
     plist = infoPlist,
 )

File pyobjc/Examples/EnvironmentPrefs/main.py

 
 TODO:
 - Undo
-- Icon, documentation, ...
-- Localize 
 """
 from AppKit import *
-from Foundation import NSBundle, NSMutableDictionary
+from Foundation import *
 from PreferencePanes import *
 import objc
 from PyObjCTools import NibClassBuilder
 ENVPLIST="~/.MacOSX/environment.plist"
 
 # Template for new keys
-NEWTMPL="New_Variable_%d"
+NEWTMPL=NSLocalizedString("New_Variable_%d", "")
 
 class EnvironmentPane (NibClassBuilder.AutoBaseClass):
     """
         # unsaved changes ask if they should be saved right now.
 
         if self.changed:
-            NSBeginAlertSheet("Save changes?",
-                "Cancel", "Don't Save", "Save",
+            NSBeginAlertSheet(
+                NSLocalizedString("Save changes?", ""),
+                NSLocalizedString("Cancel", ""), 
+                NSLocalizedString("Don't Save", ""),
+                NSLocalizedString("Save", ""),
                 self.mainView().window(),
                 self,
                 None,
                 "sheetDidDismiss:returnCode:contextInfo:",
                 0,
-                "There are unsaved changed, should these be saved?")
+                NSLocalizedString("There are unsaved changed, should these be saved?", ""))
             return NSUnselectLater
         return NSUnselectNow
 
         elif code == NSAlertOtherReturn: # 'Save'
             r = self.saveEnvironment()
             if not r:
-                self.runAlertSheet("Cannot save changes",
-                    "It was not possible to save your changes")
+                self.runAlertSheet(
+                    NSLocalizedString("Cannot save changes", ""),
+                    NSLocalizedString("It was not possible to save your changes", ""))
                 self.replyToShouldUnselect_(NSUnselectCancel)
                 return
 
         while self.environ.has_key(name):
             i += 1
             name = NEWTMPL%(i,)
-        self.environ[name] = "New Value"
-        self.keys = list(environment.keys())
+        self.environ[name] = NSLocalizedString("New Value", "")
+        self.keys = list(self.environ.keys())
         self.keys.sort()
         self.mainTable.reloadData()
         self.changed = True
         if name == "name":
             if value != envname:
                 if self.environ.has_key(value):
-                    self.runAlertSheet("Name exists",
-                        "The name %s is already used"%(value,))
+                    self.runAlertSheet(
+                        NSLocalizedString("Name exists", ""),
+                        NSLocalizedString("The name %s is already used", "")%(
+                            value,))
                     aView.reloadData()
                     return
 
     def runAlertSheet(self, title, message):
         """ Run an alertsheet without callbacks """
         NSBeginAlertSheet(title,
-            "OK", None, None,
+            NSLocalizedString("OK", ""), None, None,
             self.mainView().window(),
             self,
             None,

File pyobjc/Lib/AppKit/__init__.py

 This module does not contain docstrings for the wrapped code, check Apple's
 documentation for details on how to use these functions and classes.
 """
+
 import Foundation
 import _AppKitSignatures 
 import objc as _objc
                        NSTableViewDelegate, NSTableDataSource, NSToolTipOwner, \
                        NSToolbarItemValidation, NSToolbarDelegate, NSUserInterfaceValidations, \
                        NSValidatedUserInterfaceItem, NSApplicationDelegate, NSTextViewDelegate
+

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

     def setUp(self):
         self.NSObjectInstance = objc.runtime.NSObject.alloc().init()
 
+
     def testWithZones(self):
         obj = objc.runtime.NSObject.allocWithZone_(None).init()
         zone = obj.zone()
     def testVarargsInvocation(self):
         objc.runtime.NSArray.arrayWithObjects_("foo", "bar", None)
 
+class TestClassDict(unittest.TestCase):
+    def testDict(self):
+        self.assert_("drawAtPoint_" in objc.runtime.NSAttributedString.__dict__)
+
+
 if __name__ == '__main__':
     unittest.main()

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

 NSObject = objc.lookUpClass('NSObject')
 
 class TestSubclassing(unittest.TestCase):
+    def testMIObjC(self):
+        try:
+            class MIClass1(NSObject, objc.runtime.NSArray):
+                pass
+            self.assert_(0)
+        except TypeError:
+            pass
+
     def testSubclassOfSubclass(self):
         class Level1Class (NSObject):
             def hello(self):

File pyobjc/MANIFEST

-ChangeLog
-Doc/index.txt
-Doc/index.html
-Doc/architecture.txt
-Doc/architecture.html
-Doc/classes.txt
-Doc/classes.html
-Doc/coding-style.txt
-Doc/coding-style.html
-Doc/intro.txt
-Doc/intro.html
-Doc/libffi.txt
-Doc/libffi.html
-Doc/structure.txt
-Doc/structure.html
-Doc/TODO.txt
-Doc/TODO.html
-Doc/users.txt
-Doc/users.html
-Doc/warts.txt
-Doc/warts.html
-Doc/website.lst
-Doc/wrapping.txt
-Doc/wrapping.html
-Examples/00ReadMe.txt
-Examples/addressbook.m
-Examples/addressbook.py
-Examples/autoreadme.py
-Examples/CurrencyConverter/00README.txt
-Examples/CurrencyConverter/buildapp.py
-Examples/CurrencyConverter/CurrencyConverter.py
-Examples/CurrencyConverter/English.lproj/InfoPlist.strings
-Examples/CurrencyConverter/English.lproj/MainMenu.nib/classes.nib
-Examples/CurrencyConverter/English.lproj/MainMenu.nib/info.nib
-Examples/CurrencyConverter/English.lproj/MainMenu.nib/objects.nib
-Examples/dictionary.py
-Examples/HelloWorld.py
-Examples/iClass/buildapp.py
-Examples/iClass/datasource.py
-Examples/iClass/English.lproj/MainMenu.nib/classes.nib
-Examples/iClass/English.lproj/MainMenu.nib/info.nib
-Examples/iClass/English.lproj/MainMenu.nib/objects.nib
-Examples/iClass/main.py
-Examples/method-weirdness.py
-Examples/objc-vars.py
-Examples/pydict-to-objcdict.py
-Examples/subclassing-objective-c.py
-Examples/super-call.py
-Examples/TableModel/00ReadMe.txt
-Examples/TableModel/buildapp.py
-Examples/TableModel/English.lproj/MainMenu.nib/classes.nib
-Examples/TableModel/English.lproj/MainMenu.nib/info.nib
-Examples/TableModel/English.lproj/MainMenu.nib/objects.nib
-Examples/TableModel/TableModel.py
-Examples/TableModel2/English.lproj/InfoPlist.strings
-Examples/TableModel2/English.lproj/MainMenu.nib/classes.nib
-Examples/TableModel2/English.lproj/MainMenu.nib/info.nib
-Examples/TableModel2/English.lproj/MainMenu.nib/objects.nib
-Examples/TableModel2/main.m
-Examples/TableModel2/README.txt
-Examples/TableModel2/TableModel.py
-Examples/TableModel2/TableModel2.pbproj/project.pbxproj
-Examples/Todo/00ReadMe.txt
-Examples/Todo/buildapp.py
-Examples/Todo/CalendarMatrix.py
-Examples/Todo/English.lproj/Credits.rtf
-Examples/Todo/English.lproj/InfoPlist.strings
-Examples/Todo/English.lproj/MainMenu.nib/classes.nib
-Examples/Todo/English.lproj/MainMenu.nib/info.nib
-Examples/Todo/English.lproj/MainMenu.nib/objects.nib
-Examples/Todo/English.lproj/ToDoDocument.nib/classes.nib
-Examples/Todo/English.lproj/ToDoDocument.nib/info.nib
-Examples/Todo/English.lproj/ToDoDocument.nib/objects.nib
-Examples/Todo/English.lproj/ToDoInfoWindow.nib/classes.nib
-Examples/Todo/English.lproj/ToDoInfoWindow.nib/info.nib
-Examples/Todo/English.lproj/ToDoInfoWindow.nib/objects.nib
-Examples/Todo/Icons/ToDoApp.icns
-Examples/Todo/Icons/ToDoDoc.icns
-Examples/Todo/Images/DeferredMark.tiff
-Examples/Todo/Images/DoneMark.tiff
-Examples/Todo/Images/LeftArrow.tiff
-Examples/Todo/Images/RightArrow.tiff
-Examples/Todo/Info.plist
-Examples/Todo/InfoWindowController.py
-Examples/Todo/main.py
-Examples/Todo/SelectionNotifyMatrix.py
-Examples/Todo/TodoAppDelegate.py
-Examples/Todo/ToDoCell.py
-Examples/Todo/ToDoDocument.py
-Examples/Todo/ToDoItem.py
-Examples/using-nscoder.py
-Examples/using-nsscanner.py
-Examples/WebServicesTool/bin-python-main.m
-Examples/WebServicesTool/English.lproj/InfoPlist.strings
-Examples/WebServicesTool/English.lproj/MainMenu.nib/classes.nib
-Examples/WebServicesTool/English.lproj/MainMenu.nib/info.nib
-Examples/WebServicesTool/English.lproj/MainMenu.nib/keyedobjects.nib
-Examples/WebServicesTool/English.lproj/WSTConnection.nib/classes.nib
-Examples/WebServicesTool/English.lproj/WSTConnection.nib/info.nib
-Examples/WebServicesTool/English.lproj/WSTConnection.nib/keyedobjects.nib
-Examples/WebServicesTool/LICENSE.txt
-Examples/WebServicesTool/Main.py
-Examples/WebServicesTool/Preferences.png
-Examples/WebServicesTool/README.txt
-Examples/WebServicesTool/Reload.png
-Examples/WebServicesTool/Web Services Tool.pbproj/project.pbxproj
-Examples/WebServicesTool/WST.icns
-Examples/WebServicesTool/WST.png
-Examples/WebServicesTool/WSTApplicationDelegateClass.py
-Examples/WebServicesTool/WSTConnectionWindowControllerClass.py
-Install.txt
-Install.html
-Installer Package/Resources/Description.plist
-Installer Package/Resources/License.txt
-Installer Package/Resources/ReadMe.txt
-Lib/AddressBook/__init__.py
-Lib/AppKit/__init__.py
-Lib/AppKit/_AppKitSignatures.py
-Lib/AppKit/AppKit.byref
-Lib/AppKit/test/__init__.py
-Lib/AppKit/test/test_nsbitmapimagerep.py
-Lib/AppKit/test/test_nscell.py
-Lib/AppKit/test/test_nsworkspace.py
-Lib/Foundation/__init__.py
-Lib/Foundation/Foundation.byref
-Lib/Foundation/test/__init__.py
-Lib/Foundation/test/test_nsarray.py
-Lib/Foundation/test/test_nsautoreleasepool.py
-Lib/Foundation/test/test_nsdata.py
-Lib/Foundation/test/test_nsdictionary.py
-Lib/Foundation/test/test_nsenumerator.py
-Lib/Foundation/test/test_nsexception.py
-Lib/Foundation/test/test_nslocalizedstring.py
-Lib/Foundation/test/test_nsmachport.py
-Lib/Foundation/test/test_nsnumber.py
-Lib/Foundation/test/test_nsobject.py
-Lib/Foundation/test/test_nsset.py
-Lib/Foundation/test/test_nsstring.py
-Lib/Foundation/test/test_nsundomanager.py
-Lib/Foundation/test/test_paths.py
-Lib/Foundation/test/test_subclassing.py
-Lib/InterfaceBuilder/__init__.py
-Lib/objc/__init__.py
-Lib/objc/_convenience.py
-Lib/objc/_FoundationSignatures.py
-Lib/objc/test/__init__.py
-Lib/objc/test/test_allocatebuffer.py
-Lib/objc/test/test_leaks.py
-Lib/objc/test/test_methodedits.py
-Lib/objc/test/test_methods.py
-Lib/objc/test/test_objc.py
-Lib/objc/test/test_posing.py
-Lib/objc/test/test_regr.py
-Lib/objc/test/test_subclass.py
-Lib/objc/test/testbndl.m
-Lib/PreferencePanes/__init__.py
-Lib/PyObjCTools/__init__.py
-Lib/PyObjCTools/AppHelper.py
-Lib/PyObjCTools/Conversion.py
-Lib/PyObjCTools/NibClassBuilder.py
-Lib/PyObjCTools/Signals.py
-Lib/PyObjCTools/test/__init__.py
-Lib/PyObjCTools/test/test_collections.py
-Lib/ScreenSaver.py
-License.txt
-MANIFEST
-Modules/AddressBook/_Addr_Enum.inc
-Modules/AddressBook/_Addr_Str.inc
-Modules/AddressBook/_Addr_Var.inc
-Modules/AddressBook/_AddressBook.m
-Modules/AppKit/00ReadMe.txt
-Modules/AppKit/_App_Enum.GNUstep.inc
-Modules/AppKit/_App_Enum.inc
-Modules/AppKit/_App_Functions.GNUstep.inc
-Modules/AppKit/_App_Functions.inc
-Modules/AppKit/_App_Str.GNUstep.inc
-Modules/AppKit/_App_Str.inc
-Modules/AppKit/_App_Var.GNUstep.inc
-Modules/AppKit/_App_Var.inc
-Modules/AppKit/_AppKit.m
-Modules/AppKit/_AppKitMapping.m
-Modules/autoGIL.c
-Modules/Foundation/_Fnd_Enum.GNUstep.inc
-Modules/Foundation/_Fnd_Enum.inc
-Modules/Foundation/_Fnd_Functions.GNUstep.inc
-Modules/Foundation/_Fnd_Functions.inc
-Modules/Foundation/_Fnd_Str.GNUstep.inc
-Modules/Foundation/_Fnd_Str.inc
-Modules/Foundation/_Fnd_Var.GNUstep.inc
-Modules/Foundation/_Fnd_Var.inc
-Modules/Foundation/_Foundation.m
-Modules/Foundation/_FoundationMapping.m
-Modules/Foundation/_FoundationMapping_NSCoder.m
-Modules/Foundation/_FoundationMapping_NSData.m
-Modules/Foundation/NSAutoreleasePoolSupport.m
-Modules/InterfaceBuilder/_InterfaceBuilder.m
-Modules/InterfaceBuilder/_InterfaceBuilder_Enum.inc
-Modules/InterfaceBuilder/_InterfaceBuilder_Str.inc
-Modules/objc/alloc_hack.m
-Modules/objc/class-builder.h
-Modules/objc/class-builder.m
-Modules/objc/class-list.m
-Modules/objc/CocoaSignatures.lst
-Modules/objc/informal-protocol.m
-Modules/objc/instance-var.h
-Modules/objc/instance-var.m
-Modules/objc/libffi_support.m
-Modules/objc/method-accessor.m
-Modules/objc/module.m
-Modules/objc/objc-class.m
-Modules/objc/objc-object.m
-Modules/objc/objc_support.h
-Modules/objc/objc_support.m
-Modules/objc/objc_util.h
-Modules/objc/objc_util.m
-Modules/objc/ObjCPointer.h
-Modules/objc/ObjCPointer.m
-Modules/objc/OC_PythonArray.h
-Modules/objc/OC_PythonArray.m
-Modules/objc/OC_PythonDictionary.h
-Modules/objc/OC_PythonDictionary.m
-Modules/objc/OC_PythonInt.h
-Modules/objc/OC_PythonInt.m
-Modules/objc/OC_PythonObject.h
-Modules/objc/OC_PythonObject.m
-Modules/objc/OC_PythonString.h
-Modules/objc/OC_PythonString.m
-Modules/objc/py2.2bool.c
-Modules/objc/py2.2bool.h
-Modules/objc/pyobjc-api.h
-Modules/objc/pyobjc-api.m
-Modules/objc/pyobjc.h
-Modules/objc/register.m
-Modules/objc/selector.m
-Modules/objc/signatures.lst
-Modules/objc/super-call.h
-Modules/objc/super-call.m
-Modules/objc/unicode-object.m
-Modules/objc/wrapper-const-table.h
-Modules/PreferencePanes/_PreferencePanes.m
-Modules/PreferencePanes/_PreferencePanes_Enum.inc
-Modules/PreferencePanes/_PreferencePanes_Str.inc
-MPCompat/bundlebuilder.py
-MPCompat/plistlib.py
-MPCompat/README
-NEWS
-Project Templates/00README.txt
-ProjectBuilder Extras/Project Templates/clean.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/00README.txt
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/__main__.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/bin-python-main.m
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/CocoaApp.pbproj/project.pbxproj
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/CocoaApp.pbproj/TemplateInfo.plist
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/English.lproj/InfoPlist.strings
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/English.lproj/MainMenu.nib/classes.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/English.lproj/MainMenu.nib/info.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/English.lproj/MainMenu.nib/keyedobjects.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Application/MyAppDelegate.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/00README.txt
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/__main__.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/bin-python-main.m
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/CocoaDocApp.pbproj/project.pbxproj
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/CocoaDocApp.pbproj/TemplateInfo.plist
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/Credits.rtf
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/InfoPlist.strings
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MainMenu.nib/classes.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MainMenu.nib/info.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MainMenu.nib/keyedobjects.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MyDocument.nib/classes.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MyDocument.nib/info.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/English.lproj/MyDocument.nib/objects.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/MyAppDelegate.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python Document-based Application/MyDocument.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/__main__.py
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/bin-python-main.m
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/CocoaApp.pbproj/project.pbxproj
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/CocoaApp.pbproj/TemplateInfo.plist
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/English.lproj/InfoPlist.strings
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/English.lproj/MainMenu.nib/classes.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/English.lproj/MainMenu.nib/info.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/English.lproj/MainMenu.nib/keyedobjects.nib
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/HueView.h
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/HueView.m
-ProjectBuilder Extras/Project Templates/Cocoa-Python-ObjC Application/MyAppDelegate.py
-ProjectBuilder Extras/Specifications/Python.pbfilespec
-ProjectBuilder Extras/Specifications/Python.pblangspec
-HISTORIC.txt
-ReadMe.txt
-ReadMe.html
-Scripts/buildpkg.py
-Scripts/clean-install
-Scripts/CodeGenerators/00README.txt
-Scripts/CodeGenerators/cocoa_generator.py
-Scripts/CodeGenerators/enum_generator.py
-Scripts/CodeGenerators/func_builder.py
-Scripts/CodeGenerators/func_collector.py
-Scripts/CodeGenerators/strconst_generator.py
-Scripts/CodeGenerators/var_generator.py
-Scripts/create_byref_module.py
-Scripts/extract_byref_signatures.py
-Scripts/generate-stubs.py
-Scripts/make_distrib.py
-Scripts/nibclassbuilder
-Scripts/README
-Scripts/runalltests
-setup.py
-libffi-src/acconfig.h
-libffi-src/acinclude.m4
-libffi-src/aclocal.m4
-libffi-src/ChangeLog
-libffi-src/ChangeLog.libgcj
-libffi-src/ChangeLog.v1
-libffi-src/confdefs.h
-libffi-src/config.guess
-libffi-src/config.sub
-libffi-src/configure
-libffi-src/configure.in
-libffi-src/fficonfig.h.in
-libffi-src/include/ffi.h.in
-libffi-src/include/ffi_common.h
-libffi-src/include/ffi_mips.h
-libffi-src/include/fficonfig.h
-libffi-src/include/Makefile.am
-libffi-src/include/Makefile.in
-libffi-src/INSTALL
-libffi-src/install-sh
-libffi-src/LICENSE
-libffi-src/ltcf-c.sh
-libffi-src/ltconfig
-libffi-src/ltmain.sh
-libffi-src/Makefile.am
-libffi-src/Makefile.in
-libffi-src/mkinstalldirs
-libffi-src/README
-libffi-src/README.Ronald
-libffi-src/src/alpha/ffi.c
-libffi-src/src/alpha/osf.S
-libffi-src/src/arm/ffi.c
-libffi-src/src/arm/sysv.S
-libffi-src/src/debug.c
-libffi-src/src/ffitest.c
-libffi-src/src/ia64/ffi.c
-libffi-src/src/ia64/ia64_flags.h
-libffi-src/src/ia64/unix.S
-libffi-src/src/java_raw_api.c
-libffi-src/src/m68k/ffi.c
-libffi-src/src/m68k/sysv.S
-libffi-src/src/mips/ffi.c
-libffi-src/src/mips/n32.S
-libffi-src/src/mips/o32.S
-libffi-src/src/powerpc/aix.S
-libffi-src/src/powerpc/aix_closure.S
-libffi-src/src/powerpc/asm.h
-libffi-src/src/powerpc/darwin.S
-libffi-src/src/powerpc/darwin_closure.S
-libffi-src/src/powerpc/ffi.c
-libffi-src/src/powerpc/ffi_darwin.c
-libffi-src/src/powerpc/ppc_closure.S
-libffi-src/src/powerpc/sysv.S
-libffi-src/src/prep_cif.c
-libffi-src/src/raw_api.c
-libffi-src/src/s390/ffi.c
-libffi-src/src/s390/sysv.S
-libffi-src/src/sh/ffi.c
-libffi-src/src/sh/sysv.S
-libffi-src/src/sparc/ffi.c
-libffi-src/src/sparc/v8.S
-libffi-src/src/sparc/v9.S
-libffi-src/src/types.c
-libffi-src/src/x86/ffi.c
-libffi-src/src/x86/ffi64.c
-libffi-src/src/x86/sysv.S
-libffi-src/src/x86/unix64.S
-libffi-src/src/x86/win32.S
-libffi-src/stamp-h.in
-Doc/tutorial
-Doc/tutorial/step12-src
-Doc/tutorial/step12-src/CurrencyConverter.py
-Doc/tutorial/step12-src/MainMenu.nib
-Doc/tutorial/step12-src/MainMenu.nib/classes.nib
-Doc/tutorial/step12-src/MainMenu.nib/info.nib
-Doc/tutorial/step12-src/MainMenu.nib/objects.nib
-Doc/tutorial/step3-MainMenu.nib
-Doc/tutorial/step3-MainMenu.nib/classes.nib
-Doc/tutorial/step3-MainMenu.nib/info.nib
-Doc/tutorial/step3-MainMenu.nib/objects.nib
-Doc/tutorial/step4-CurrencyConverter.py
-Doc/tutorial/step5-CurrencyConverter.py
-Doc/tutorial/step8-CurrencyConverter.py
-Doc/tutorial/tutorial.txt
-Doc/tutorial/tutorial.html

File pyobjc/MANIFEST.in

+include ChangeLog *.txt *.html MANIFEST.in NEWS setup.py
+graft Doc 
+graft Examples 
+graft Installer?Package
+graft Lib 
+graft MPCompat 
+graft Modules 
+graft ProjectBuilder?Extras
+graft Scripts 
+graft libffi-src 
+prune Examples/*/build
+prune Examples/*/*~.nib
+prune Examples/*/*/*~.nib
+global-exclude .DS_Store
+global-exclude *.pbxuser

File pyobjc/Modules/AppKit/_AppKitMapping_NSGraphicsContext.m

  * NSGraphicsContext mappings for difficult methods:
  *
  * TODO:
- * -graphicsPort
+ * -graphicsPort, there doesn't seem to be a MacPython wrapper for this?
  *
  * Unsupported:
  * -focusStack

File pyobjc/Modules/AppKit/_AppKitMapping_NSWindow.m

 /*
  * Special wrappers for NSWindow methods with 'difficult' arguments.
  *
- * TODO
- * -graphicsPort
+ * Note: WindowRef is the new name for WindowPtr, the old name is used in
+ * the MacPython headers.
+ *
  * -initWithWindowRef:
  * -windowRef
  */
 #include <AppKit/AppKit.h>
 #include "pyobjc-api.h"
 
+#include "pymactoolbox.h"
+
+static PyObject* call_NSWindow_windowRef(
+		PyObject* method __attribute__((__unused__)), PyObject* self, PyObject* arguments)
+{
+	PyObject* result;
+	struct objc_super super;
+	void*     windowRef;
+
+	if  (PyArg_ParseTuple(arguments, "") < 0) {
+		return NULL;
+	}
+
+	NS_DURING
+		PyObjC_InitSuper(&super, 
+			PyObjCClass_GetClass((PyObject*)(self->ob_type)),
+			PyObjCObject_GetObject(self));
+
+
+		windowRef = objc_msgSendSuper(&super,
+				@selector(windowRef));
+		if (windowRef == NULL) {
+			result = Py_None;
+			Py_INCREF(result);
+		} else {
+			result = WinObj_New((WindowPtr)windowRef);
+		}
+	NS_HANDLER
+		PyObjCErr_FromObjC(localException);
+		result = NULL;
+	NS_ENDHANDLER
+
+	return result;
+}
+
+static void* imp_NSWindow_windowRef(id self, SEL sel)
+{
+	PyObject* result;
+	PyObject* arglist;
+	void*    objc_result;
+
+	arglist = PyTuple_New(0);
+	if (arglist == NULL) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	result = PyObjC_CallPython(self, sel, arglist);
+	Py_DECREF(arglist);
+	if (result == NULL) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	WinObj_Convert(result, (WindowPtr*)&objc_result); 
+	Py_DECREF(result);
+
+	if (PyErr_Occurred()) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	return objc_result;
+}
+
+
+static PyObject* call_NSWindow_initWithWindowRef_(
+		PyObject* method __attribute__((__unused__)), PyObject* self, PyObject* arguments)
+{
+	PyObject* result;
+	struct objc_super super;
+	void*     windowRef;
+	id        objc_result;
+
+	if  (PyArg_ParseTuple(arguments, "O&", WinObj_Convert, &windowRef) < 0) {
+		return NULL;
+	}
+
+	NS_DURING
+		PyObjC_InitSuper(&super, 
+			PyObjCClass_GetClass((PyObject*)(self->ob_type)),
+			PyObjCObject_GetObject(self));
+
+		objc_result = objc_msgSendSuper(&super,
+				@selector(initWithWindowRef:), windowRef);
+		result = PyObjC_IdToPython(objc_result);
+	NS_HANDLER
+		PyObjCErr_FromObjC(localException);
+		result = NULL;
+	NS_ENDHANDLER
+
+	return result;
+}
+
+static id imp_NSWindow_initWithWindowRef_(id self, SEL sel, void* windowRef)
+{
+	PyObject* result;
+	PyObject* arglist;
+	id        objc_result;
+
+	arglist = PyTuple_New(1);
+	if (arglist == NULL) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+	
+	PyTuple_SET_ITEM(arglist, 0, WinObj_New(windowRef));
+	if (PyErr_Occurred()) {
+		Py_DECREF(arglist);
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	result = PyObjC_CallPython(self, sel, arglist);
+	Py_DECREF(arglist);
+	if (result == NULL) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	objc_result = PyObjC_PythonToId(result);
+
+	if (PyErr_Occurred()) {
+		PyObjCErr_ToObjC();
+		return nil;
+	}
+
+	return objc_result;
+}
 
 
 static int 
 
 	if (PyObjC_RegisterMethodMapping(
 		classNSWindow,
-		@selector(graphicsPort),
-		PyObjCUnsupportedMethod_Caller,
-		PyObjCUnsupportedMethod_IMP) < 0) {
-
-		return -1;
-	}
-
-	if (PyObjC_RegisterMethodMapping(
-		classNSWindow,
-		@selector(initWihtWindowRef),
-		PyObjCUnsupportedMethod_Caller,
-		PyObjCUnsupportedMethod_IMP) < 0) {
+		@selector(initWithWindowRef:),
+		call_NSWindow_initWithWindowRef_,
+		(IMP)imp_NSWindow_initWithWindowRef_) < 0) {
 
 		return -1;
 	}
 	if (PyObjC_RegisterMethodMapping(
 		classNSWindow,
 		@selector(windowRef),
-		PyObjCUnsupportedMethod_Caller,
-		PyObjCUnsupportedMethod_IMP) < 0) {
+		call_NSWindow_windowRef,
+		(IMP)imp_NSWindow_windowRef) < 0) {
 
 		return -1;
 	}

File pyobjc/Modules/AppKit/_App_Functions.inc

             *(SEL*)pvar = NULL;
             return 1;
         }
+        if (PyObjCSelector_Check(object)) {
+            *(SEL*)pvar = PyObjCSelector_GetSelector(object);
+            return 1;
+        }
 	if (!PyString_Check(object)) {
 		PyErr_SetString(PyExc_TypeError, "Expected string");
 		return 0;

File pyobjc/Modules/Foundation/_Fnd_Enum.inc

 
 	/* From: NSEnumerator.h */
 
+	/* From: NSError.h */
+
 	/* From: NSException.h */
 
 	/* From: NSFileHandle.h */
 
 	/* From: NSHost.h */
 
+	/* From: NSHTTPCookie.h */
+
+	/* From: NSHTTPCookieStorage.h */
+	 { "NSHTTPCookieAcceptPolicyAlways", NSHTTPCookieAcceptPolicyAlways },
+	 { "NSHTTPCookieAcceptPolicyNever", NSHTTPCookieAcceptPolicyNever },
+	 { "NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain", NSHTTPCookieAcceptPolicyOnlyFromMainDocumentDomain },
+
 	/* From: NSInvocation.h */
 	 { "NSObjCNoType", NSObjCNoType },
 	 { "NSObjCVoidType", NSObjCVoidType },
 
 	/* From: NSURL.h */
 
+	/* From: NSURLAuthenticationChallenge.h */
+
+	/* From: NSURLCache.h */
+
+	/* From: NSURLConnection.h */
+
+	/* From: NSURLCredential.h */
+	 { "NSURLCredentialPersistenceNone", NSURLCredentialPersistenceNone },
+	 { "NSURLCredentialPersistenceForSession", NSURLCredentialPersistenceForSession },
+	 { "NSURLCredentialPersistencePermanent", NSURLCredentialPersistencePermanent },
+
+	/* From: NSURLCredentialStorage.h */
+
+	/* From: NSURLDownload.h */
+
+	/* From: NSURLError.h */
+
 	/* From: NSURLHandle.h */
 	 { "NSURLHandleNotLoaded", NSURLHandleNotLoaded },
 	 { "NSURLHandleLoadSucceeded", NSURLHandleLoadSucceeded },
 	 { "NSURLHandleLoadInProgress", NSURLHandleLoadInProgress },
 	 { "NSURLHandleLoadFailed", NSURLHandleLoadFailed },
 
+	/* From: NSURLProtectionSpace.h */
+
+	/* From: NSURLProtocol.h */
+
+	/* From: NSURLRequest.h */
+
+	/* From: NSURLResponse.h */
+
 	/* From: NSUserDefaults.h */
 
 	/* From: NSUtilities.h */

File pyobjc/Modules/Foundation/_Fnd_Functions.inc

             *(SEL*)pvar = NULL;
             return 1;
         }
+        if (PyObjCSelector_Check(object)) {
+            *(SEL*)pvar = PyObjCSelector_GetSelector(object);
+            return 1;
+        }
 	if (!PyString_Check(object)) {
 		PyErr_SetString(PyExc_TypeError, "Expected string");
 		return 0;

File pyobjc/Modules/Foundation/_Fnd_Str.inc

 
 	/* From: NSEnumerator.h */
 
+	/* From: NSError.h */
+	 { "NSLocalizedDescriptionKey", &NSLocalizedDescriptionKey },
+	 { "NSPOSIXErrorDomain", &NSPOSIXErrorDomain },
+	 { "NSOSStatusErrorDomain", &NSOSStatusErrorDomain },
+	 { "NSMachErrorDomain", &NSMachErrorDomain },
+
 	/* From: NSException.h */
 	 { "NSGenericException", &NSGenericException },
 	 { "NSRangeException", &NSRangeException },
 
 	/* From: NSHost.h */
 
+	/* From: NSHTTPCookie.h */
+	 { "NSHTTPCookieName", &NSHTTPCookieName },
+	 { "NSHTTPCookieValue", &NSHTTPCookieValue },
+	 { "NSHTTPCookieOriginURL", &NSHTTPCookieOriginURL },
+	 { "NSHTTPCookieVersion", &NSHTTPCookieVersion },
+	 { "NSHTTPCookieDomain", &NSHTTPCookieDomain },
+	 { "NSHTTPCookiePath", &NSHTTPCookiePath },
+	 { "NSHTTPCookieSecure", &NSHTTPCookieSecure },
+	 { "NSHTTPCookieExpires", &NSHTTPCookieExpires },
+	 { "NSHTTPCookieComment", &NSHTTPCookieComment },
+	 { "NSHTTPCookieCommentURL", &NSHTTPCookieCommentURL },
+	 { "NSHTTPCookieDiscard", &NSHTTPCookieDiscard },
+	 { "NSHTTPCookieMaximumAge", &NSHTTPCookieMaximumAge },
+	 { "NSHTTPCookiePort", &NSHTTPCookiePort },
+
+	/* From: NSHTTPCookieStorage.h */
+	 { "NSHTTPCookieManagerAcceptPolicyChangedNotification", &NSHTTPCookieManagerAcceptPolicyChangedNotification },
+	 { "NSHTTPCookieManagerCookiesChangedNotification", &NSHTTPCookieManagerCookiesChangedNotification },
+
 	/* From: NSInvocation.h */
 
 	/* From: NSJavaSetup.h */
 	/* From: NSURL.h */
 	 { "NSURLFileScheme", &NSURLFileScheme },
 
+	/* From: NSURLAuthenticationChallenge.h */
+
+	/* From: NSURLCache.h */
+
+	/* From: NSURLConnection.h */
+
+	/* From: NSURLCredential.h */
+
+	/* From: NSURLCredentialStorage.h */
+	 { "NSURLCredentialStorageChangedNotification", &NSURLCredentialStorageChangedNotification },
+
+	/* From: NSURLDownload.h */
+
+	/* From: NSURLError.h */
+	 { "NSURLErrorDomain", &NSURLErrorDomain },
+	 { "NSErrorFailingURLStringKey", &NSErrorFailingURLStringKey },
+
 	/* From: NSURLHandle.h */
 	 { "NSHTTPPropertyStatusCodeKey", &NSHTTPPropertyStatusCodeKey },
 	 { "NSHTTPPropertyStatusReasonKey", &NSHTTPPropertyStatusReasonKey },
 	 { "NSFTPPropertyActiveTransferModeKey", &NSFTPPropertyActiveTransferModeKey },
 	 { "NSFTPPropertyFileOffsetKey", &NSFTPPropertyFileOffsetKey },
 
+	/* From: NSURLProtectionSpace.h */
+	 { "NSURLProtectionSpaceHTTPProxy", &NSURLProtectionSpaceHTTPProxy },
+	 { "NSURLProtectionSpaceHTTPSProxy", &NSURLProtectionSpaceHTTPSProxy },
+	 { "NSURLProtectionSpaceFTPProxy", &NSURLProtectionSpaceFTPProxy },
+	 { "NSURLProtectionSpaceSOCKSProxy", &NSURLProtectionSpaceSOCKSProxy },
+	 { "NSURLAuthenticationMethodDefault", &NSURLAuthenticationMethodDefault },
+	 { "NSURLAuthenticationMethodHTTPBasic", &NSURLAuthenticationMethodHTTPBasic },
+	 { "NSURLAuthenticationMethodHTTPDigest", &NSURLAuthenticationMethodHTTPDigest },
+	 { "NSURLAuthenticationMethodHTMLForm", &NSURLAuthenticationMethodHTMLForm },
+
+	/* From: NSURLProtocol.h */
+
+	/* From: NSURLRequest.h */
+
+	/* From: NSURLResponse.h */
+
 	/* From: NSUserDefaults.h */
 	 { "NSGlobalDomain", &NSGlobalDomain },
 	 { "NSArgumentDomain", &NSArgumentDomain },

File pyobjc/Modules/Foundation/_Fnd_Var.inc

 
 	/* From: NSEnumerator.h */
 
+	/* From: NSError.h */
+
 	/* From: NSException.h */
 
 	/* From: NSFileHandle.h */
 
 	/* From: NSHost.h */
 
+	/* From: NSHTTPCookie.h */
+
+	/* From: NSHTTPCookieStorage.h */
+
 	/* From: NSInvocation.h */
 
 	/* From: NSJavaSetup.h */
 
 	/* From: NSURL.h */
 
+	/* From: NSURLAuthenticationChallenge.h */
+
+	/* From: NSURLCache.h */
+
+	/* From: NSURLConnection.h */
+
+	/* From: NSURLCredential.h */
+
+	/* From: NSURLCredentialStorage.h */
+
+	/* From: NSURLDownload.h */
+
+	/* From: NSURLError.h */
+
 	/* From: NSURLHandle.h */
 
+	/* From: NSURLProtectionSpace.h */
+
+	/* From: NSURLProtocol.h */
+
+	/* From: NSURLRequest.h */
+
+	/* From: NSURLResponse.h */
+
 	/* From: NSUserDefaults.h */
 
 	/* From: NSUtilities.h */

File pyobjc/Modules/objc/module.m

 		bundle = [NSBundle bundleWithIdentifier:strval];
 	}
 
+	//NSLog(@"loadBundle %@", strval);
+
 	[bundle load];
 
 	class_list = PyObjC_GetClassList();
 	Py_XDECREF(module_key);
 	Py_XDECREF(class_list);
 
+	//NSLog(@"loadBundle %@ DONE", strval);
+
 	Py_INCREF(Py_None);
 	return Py_None;
 }
 {
 	PyObject *m, *d;
 
+	//NSLog(@"initobjc");
+
 	/* Allocate an auto-release pool for our own use, this avoids numerous
 	 * warnings during startup of a python script.
 	 */

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

 	PyObjC_class_info* info;
 	int		   magic;
 
-	//printf("chkml_called %s %d\n", ((PyTypeObject*)cls)->tp_name, recursive);
+	//NSLog(@"chkml_called %s %d\n", ((PyTypeObject*)cls)->tp_name, recursive);
 	info = get_class_info(cls);
 
 	if (info->class == NULL) return;
 	 *       and modify as needed, that would avoid unnecessary rescans
 	 * 	 of superclasses. The same strategy is used in object_getattro.
 	 */
-	if (PyString_Check(name) && strncmp(PyString_AS_STRING(name), "__", 2) == 0) {
+	if (PyString_Check(name) 
+			&& strncmp(PyString_AS_STRING(name), "__", 2) == 0 
+			&& strcmp(PyString_AS_STRING(name), "__dict__") != 0) {
 		result = PyType_Type.tp_getattro(self, name);
 		if (result != NULL) {
 			return result;

File pyobjc/Modules/objc/pyobjc-api.h

  * This is the *only* header file that should be used to access 
  * functionality in the core bridge.
  *
- * $Id: pyobjc-api.h,v 1.16 2003/06/09 12:18:10 ronaldoussoren Exp $
+ * $Id: pyobjc-api.h,v 1.17 2003/06/28 12:57:51 ronaldoussoren Exp $
  */
 
 #include <Python.h>
 
 #define PyObjCObject_Check(obj) PyObject_TypeCheck(obj, PyObjC_API->object_type)
 #define PyObjCClass_Check(obj)  PyObject_TypeCheck(obj, PyObjC_API->class_type)
-#define PyObjCSelector_Check(obj)  PyObject_TypeCheck(obj, PyObjC_API->class_type)
+#define PyObjCSelector_Check(obj)  PyObject_TypeCheck(obj, PyObjC_API->select_type)
 #define PyObjCObject_GetObject (PyObjC_API->obj_get_object)
 #define PyObjCObject_ClearObject (PyObjC_API->obj_clear_object)
 #define PyObjCClass_GetClass   (PyObjC_API->cls_get_class)

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

 	PyObject*        pyclass;
 	PyObject* 	 entry;
 
+	//NSLog(@"Register mapping for %s in %s", SELNAME(sel), class->name);
+
 	if (signature_registry == NULL) {
 		if (init_registry() < 0) return -1;
 	}

File pyobjc/Modules/objc/toll-free-bridging.m

 
 PyObject* PyObjC_IDToCFType(id argument)
 {
-#if PY_VERSION_HEX >= 0x020300B2
-	return CFObj_New((CFTypeRef)argument);
 
-#else
 	if ([argument isKindOfClass:[NSMutableString class]]) {
 		return CFMutableStringRefObj_New((CFMutableStringRef)argument);
 	}
 	 * type.  As is is not document which type this is, we use the most
 	 * generic one.
 	 */
+#if PY_VERSION_HEX >= 0x020300B2
+	return CFObj_New((CFTypeRef)argument);
+#else
 	return CFTypeRefObj_New((CFTypeRef)argument);
 #endif 
 }

File pyobjc/Modules/objc/wrapper-const-table.h

 	return 0;
 }
 
+static inline int add_id(PyObject* d, char* name, id value)
+{
+	int res;
+	PyObject* v;
+
+	v = PyObjC_ObjCToPython("@", &value);
+	if (v == NULL) return -1;
+
+	res = PyDict_SetItemString(d, name, v);
+	if (res < 0) return -1;
+	return 0;
+}
+
+
 static inline int register_strings(PyObject* d, struct stringtable* table)
 {
 	while (table->name != NULL) {

File pyobjc/Scripts/CodeGenerators/func_builder.py

             *(SEL*)pvar = NULL;
             return 1;
         }
+        if (PyObjCSelector_Check(object)) {
+            *(SEL*)pvar = PyObjCSelector_GetSelector(object);
+            return 1;
+        }
 	if (!PyString_Check(object)) {
 		PyErr_SetString(PyExc_TypeError, "Expected string");
 		return 0;

File pyobjc/Scripts/clean-install

     print "- Removing %s"%p
     os.unlink(p)
 
-os.system("LIBFFI_BASE='%s/libffi' '%s' setup.py install"%(
+os.system("LIBFFI_BASE='%s/libffi' '%s' setup.py install -f"%(
     os.getcwd(), sys.executable))