Commits

Anonymous committed 6903696

Fixed namespace collision with Apple's version of python (non-flat namespace, I would guess -- not sure). In any case, I modified the generator script to emit a the 'static' keyword in front of the various tables that are generated. This prevents a symbol collision at runtime in the "_AppKit" module (the error is suppressed by an exception handler in Foundation's __init__.py -- under 2.3, the linker would spew errors (not in 2.2).

Modified Main.py to explicitly import Foundation before AppKit to avoid a linker problem.

Removed some debugging output from the various modules. Python based Cocoa apps now launch silently. Still die with noise, though. Not sure why.

  • Participants
  • Parent commits 90f5190

Comments (0)

Files changed (13)

File pyobjc/Examples/WebServicesTool/Main.py

 #!/usr/bin/python
 
 import sys
+
 import objc
-from AppKit import NSApplicationMain
+import Foundation
+
+import AppKit
 
 import WSTApplicationDelegateClass
 import WSTConnectionWindowControllerClass
 
-sys.exit(NSApplicationMain(sys.argv))
+sys.exit( AppKit.NSApplicationMain(sys.argv) )

File pyobjc/Examples/WebServicesTool/Web Services Tool.pbproj/project.pbxproj

 		};
 		29B97317FDCFA39411CA2CEA = {
 			children = (
+				F62CEFC10357250301718D22,
 				29B97318FDCFA39411CA2CEA,
 				089C165CFE840E0CC02AAC07,
 				F6CD0DC5033C279E0126A167,
 		};
 		29B97326FDCFA39411CA2CEA = {
 			buildPhases = (
+				F62CEFA50357242601718D22,
 				29B97327FDCFA39411CA2CEA,
 				29B97328FDCFA39411CA2CEA,
 				29B9732BFDCFA39411CA2CEA,
 //F62
 //F63
 //F64
+		F62CEFA50357242601718D22 = {
+			buildActionMask = 8;
+			dstPath = pyobjc;
+			dstSubfolderSpec = 7;
+			files = (
+				F62CEFBE035724EB01718D22,
+				F62CEFBF035724EB01718D22,
+				F62CEFC0035724EB01718D22,
+			);
+			isa = PBXCopyFilesBuildPhase;
+			runOnlyForDeploymentPostprocessing = 1;
+		};
+		F62CEFA6035724EB01718D22 = {
+			includeInIndex = 1;
+			isa = PBXFolderReference;
+			name = AppKit;
+			path = "/usr/lib/python2.2/site-packages/AppKit";
+			refType = 0;
+		};
+		F62CEFAD035724EB01718D22 = {
+			includeInIndex = 1;
+			isa = PBXFolderReference;
+			name = Foundation;
+			path = "/usr/lib/python2.2/site-packages/Foundation";
+			refType = 0;
+		};
+		F62CEFB2035724EB01718D22 = {
+			includeInIndex = 1;
+			isa = PBXFolderReference;
+			name = objc;
+			path = "/usr/lib/python2.2/site-packages/objc";
+			refType = 0;
+		};
+		F62CEFBE035724EB01718D22 = {
+			fileRef = F62CEFA6035724EB01718D22;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F62CEFBF035724EB01718D22 = {
+			fileRef = F62CEFAD035724EB01718D22;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F62CEFC0035724EB01718D22 = {
+			fileRef = F62CEFB2035724EB01718D22;
+			isa = PBXBuildFile;
+			settings = {
+			};
+		};
+		F62CEFC10357250301718D22 = {
+			children = (
+				F62CEFA6035724EB01718D22,
+				F62CEFAD035724EB01718D22,
+				F62CEFB2035724EB01718D22,
+			);
+			isa = PBXGroup;
+			name = pyobjc;
+			refType = 4;
+		};
 		F6646A4E0344927801F2B36F = {
 			isa = PBXFileReference;
 			path = Main.py;

File pyobjc/Examples/WebServicesTool/main-bin-python.m

   int i;
   
   NSString *pythonBinPath = [[NSUserDefaults standardUserDefaults] stringForKey: @"PythonBinPath"];
-
   pythonBinPath = pythonBinPath ? pythonBinPath : @"/usr/bin/python";
   [pythonBinPath retain];
   pythonBinPathPtr = [pythonBinPath cString];

File pyobjc/Lib/Foundation/__init__.py

 	defined in that bundle/framework
 	"""
 	bundle_class = _objc.lookup_class('NSBundle')
-	print "Bundle-class = ", bundle_class
+	# print "Bundle-class = ", bundle_class
 	bndl = bundle_class.bundleWithPath_(path)
-	print "Bundle = ", bndl, path
+	# print "Bundle = ", bndl, path
 	bndl.load()
 	classes = [ cls 
 			for cls in _objc.class_list() 

File pyobjc/Modules/Cocoa/_App_Enum.inc

  * Enumeration constants. This file is generated from files in
  * /System/Library/Frameworks/AppKit.framework/Headers
  */
-struct inttable enum_table[] = {
+static struct inttable enum_table[] = {
 
 	/* From: AppKit.h */
 

File pyobjc/Modules/Cocoa/_App_Str.inc

 /*
  * String constants. This file is generated from files in
- * /System/Library/Frameworks/AppKit.framework/Headers
+ * /System/Library/Frameworks/AppKit.framework/Headers/
  */
-struct stringtable string_table[] = {
+static struct stringtable string_table[] = {
 
 	/* From: AppKit.h */
 
 	/* From: AppKitDefines.h */
 
+	/* From: NSAccessibility.h */
+	 { "NSAccessibilityException", &NSAccessibilityException },
+	 { "NSAccessibilityErrorCodeExceptionInfo", &NSAccessibilityErrorCodeExceptionInfo },
+	 { "NSAccessibilityRoleAttribute", &NSAccessibilityRoleAttribute },
+	 { "NSAccessibilityRoleDescriptionAttribute", &NSAccessibilityRoleDescriptionAttribute },
+	 { "NSAccessibilitySubroleAttribute", &NSAccessibilitySubroleAttribute },
+	 { "NSAccessibilityHelpAttribute", &NSAccessibilityHelpAttribute },
+	 { "NSAccessibilityTitleAttribute", &NSAccessibilityTitleAttribute },
+	 { "NSAccessibilityValueAttribute", &NSAccessibilityValueAttribute },
+	 { "NSAccessibilityMinValueAttribute", &NSAccessibilityMinValueAttribute },
+	 { "NSAccessibilityMaxValueAttribute", &NSAccessibilityMaxValueAttribute },
+	 { "NSAccessibilityEnabledAttribute", &NSAccessibilityEnabledAttribute },
+	 { "NSAccessibilityFocusedAttribute", &NSAccessibilityFocusedAttribute },
+	 { "NSAccessibilityParentAttribute", &NSAccessibilityParentAttribute },
+	 { "NSAccessibilityChildrenAttribute", &NSAccessibilityChildrenAttribute },
+	 { "NSAccessibilityWindowAttribute", &NSAccessibilityWindowAttribute },
+	 { "NSAccessibilitySelectedChildrenAttribute", &NSAccessibilitySelectedChildrenAttribute },
+	 { "NSAccessibilityVisibleChildrenAttribute", &NSAccessibilityVisibleChildrenAttribute },
+	 { "NSAccessibilityPositionAttribute", &NSAccessibilityPositionAttribute },
+	 { "NSAccessibilitySizeAttribute", &NSAccessibilitySizeAttribute },
+	 { "NSAccessibilityContentsAttribute", &NSAccessibilityContentsAttribute },
+	 { "NSAccessibilityPreviousContentsAttribute", &NSAccessibilityPreviousContentsAttribute },
+	 { "NSAccessibilityNextContentsAttribute", &NSAccessibilityNextContentsAttribute },
+	 { "NSAccessibilitySelectedTextAttribute", &NSAccessibilitySelectedTextAttribute },
+	 { "NSAccessibilitySelectedTextRangeAttribute", &NSAccessibilitySelectedTextRangeAttribute },
+	 { "NSAccessibilityMainAttribute", &NSAccessibilityMainAttribute },
+	 { "NSAccessibilityMinimizedAttribute", &NSAccessibilityMinimizedAttribute },
+	 { "NSAccessibilityCloseButtonAttribute", &NSAccessibilityCloseButtonAttribute },
+	 { "NSAccessibilityZoomButtonAttribute", &NSAccessibilityZoomButtonAttribute },
+	 { "NSAccessibilityMinimizeButtonAttribute", &NSAccessibilityMinimizeButtonAttribute },
+	 { "NSAccessibilityToolbarButtonAttribute", &NSAccessibilityToolbarButtonAttribute },
+	 { "NSAccessibilityProxyAttribute", &NSAccessibilityProxyAttribute },
+	 { "NSAccessibilityGrowAreaAttribute", &NSAccessibilityGrowAreaAttribute },
+	 { "NSAccessibilityMenuBarAttribute", &NSAccessibilityMenuBarAttribute },
+	 { "NSAccessibilityWindowsAttribute", &NSAccessibilityWindowsAttribute },
+	 { "NSAccessibilityFrontmostAttribute", &NSAccessibilityFrontmostAttribute },
+	 { "NSAccessibilityHiddenAttribute", &NSAccessibilityHiddenAttribute },
+	 { "NSAccessibilityMainWindowAttribute", &NSAccessibilityMainWindowAttribute },
+	 { "NSAccessibilityFocusedWindowAttribute", &NSAccessibilityFocusedWindowAttribute },
+	 { "NSAccessibilityFocusedUIElementAttribute", &NSAccessibilityFocusedUIElementAttribute },
+	 { "NSAccessibilityHeaderAttribute", &NSAccessibilityHeaderAttribute },
+	 { "NSAccessibilityEditedAttribute", &NSAccessibilityEditedAttribute },
+	 { "NSAccessibilityTabsAttribute", &NSAccessibilityTabsAttribute },
+	 { "NSAccessibilityTitleUIElementAttribute", &NSAccessibilityTitleUIElementAttribute },
+	 { "NSAccessibilityHorizontalScrollBarAttribute", &NSAccessibilityHorizontalScrollBarAttribute },
+	 { "NSAccessibilityVerticalScrollBarAttribute", &NSAccessibilityVerticalScrollBarAttribute },
+	 { "NSAccessibilityOverflowButtonAttribute", &NSAccessibilityOverflowButtonAttribute },
+	 { "NSAccessibilityIncrementButtonAttribute", &NSAccessibilityIncrementButtonAttribute },
+	 { "NSAccessibilityDecrementButtonAttribute", &NSAccessibilityDecrementButtonAttribute },
+	 { "NSAccessibilityFilenameAttribute", &NSAccessibilityFilenameAttribute },
+	 { "NSAccessibilityExpandedAttribute", &NSAccessibilityExpandedAttribute },
+	 { "NSAccessibilitySelectedAttribute", &NSAccessibilitySelectedAttribute },
+	 { "NSAccessibilityColumnTitlesAttribute", &NSAccessibilityColumnTitlesAttribute },
+	 { "NSAccessibilitySplittersAttribute", &NSAccessibilitySplittersAttribute },
+	 { "NSAccessibilityDocumentAttribute", &NSAccessibilityDocumentAttribute },
+	 { "NSAccessibilityOrientationAttribute", &NSAccessibilityOrientationAttribute },
+	 { "NSAccessibilityVerticalOrientationValue", &NSAccessibilityVerticalOrientationValue },
+	 { "NSAccessibilityHorizontalOrientationValue", &NSAccessibilityHorizontalOrientationValue },
+	 { "NSAccessibilityRowsAttribute", &NSAccessibilityRowsAttribute },
+	 { "NSAccessibilityVisibleRowsAttribute", &NSAccessibilityVisibleRowsAttribute },
+	 { "NSAccessibilitySelectedRowsAttribute", &NSAccessibilitySelectedRowsAttribute },
+	 { "NSAccessibilityColumnsAttribute", &NSAccessibilityColumnsAttribute },
+	 { "NSAccessibilityVisibleColumnsAttribute", &NSAccessibilityVisibleColumnsAttribute },
+	 { "NSAccessibilitySelectedColumnsAttribute", &NSAccessibilitySelectedColumnsAttribute },
+	 { "NSAccessibilitySortDirectionAttribute", &NSAccessibilitySortDirectionAttribute },
+	 { "NSAccessibilityDisclosingAttribute", &NSAccessibilityDisclosingAttribute },
+	 { "NSAccessibilityDisclosedRowsAttribute", &NSAccessibilityDisclosedRowsAttribute },
+	 { "NSAccessibilityDisclosedByRowAttribute", &NSAccessibilityDisclosedByRowAttribute },
+	 { "NSAccessibilityPressAction", &NSAccessibilityPressAction },
+	 { "NSAccessibilityIncrementAction", &NSAccessibilityIncrementAction },
+	 { "NSAccessibilityDecrementAction", &NSAccessibilityDecrementAction },
+	 { "NSAccessibilityConfirmAction", &NSAccessibilityConfirmAction },
+	 { "NSAccessibilityPickAction", &NSAccessibilityPickAction },
+	 { "NSAccessibilityMainWindowChangedNotification", &NSAccessibilityMainWindowChangedNotification },
+	 { "NSAccessibilityFocusedWindowChangedNotification", &NSAccessibilityFocusedWindowChangedNotification },
+	 { "NSAccessibilityFocusedUIElementChangedNotification", &NSAccessibilityFocusedUIElementChangedNotification },
+	 { "NSAccessibilityApplicationActivatedNotification", &NSAccessibilityApplicationActivatedNotification },
+	 { "NSAccessibilityApplicationDeactivatedNotification", &NSAccessibilityApplicationDeactivatedNotification },
+	 { "NSAccessibilityApplicationHiddenNotification", &NSAccessibilityApplicationHiddenNotification },
+	 { "NSAccessibilityApplicationShownNotification", &NSAccessibilityApplicationShownNotification },
+	 { "NSAccessibilityWindowCreatedNotification", &NSAccessibilityWindowCreatedNotification },
+	 { "NSAccessibilityWindowMovedNotification", &NSAccessibilityWindowMovedNotification },
+	 { "NSAccessibilityWindowResizedNotification", &NSAccessibilityWindowResizedNotification },
+	 { "NSAccessibilityWindowMiniaturizedNotification", &NSAccessibilityWindowMiniaturizedNotification },
+	 { "NSAccessibilityWindowDeminiaturizedNotification", &NSAccessibilityWindowDeminiaturizedNotification },
+	 { "NSAccessibilityValueChangedNotification", &NSAccessibilityValueChangedNotification },
+	 { "NSAccessibilityUIElementDestroyedNotification", &NSAccessibilityUIElementDestroyedNotification },
+	 { "NSAccessibilityUnknownRole", &NSAccessibilityUnknownRole },
+	 { "NSAccessibilityButtonRole", &NSAccessibilityButtonRole },
+	 { "NSAccessibilityRadioButtonRole", &NSAccessibilityRadioButtonRole },
+	 { "NSAccessibilityCheckBoxRole", &NSAccessibilityCheckBoxRole },
+	 { "NSAccessibilitySliderRole", &NSAccessibilitySliderRole },
+	 { "NSAccessibilityTabGroupRole", &NSAccessibilityTabGroupRole },
+	 { "NSAccessibilityTextFieldRole", &NSAccessibilityTextFieldRole },
+	 { "NSAccessibilityStaticTextRole", &NSAccessibilityStaticTextRole },
+	 { "NSAccessibilityTextAreaRole", &NSAccessibilityTextAreaRole },
+	 { "NSAccessibilityScrollAreaRole", &NSAccessibilityScrollAreaRole },
+	 { "NSAccessibilityPopUpButtonRole", &NSAccessibilityPopUpButtonRole },
+	 { "NSAccessibilityMenuButtonRole", &NSAccessibilityMenuButtonRole },
+	 { "NSAccessibilityTableRole", &NSAccessibilityTableRole },
+	 { "NSAccessibilityApplicationRole", &NSAccessibilityApplicationRole },
+	 { "NSAccessibilityGroupRole", &NSAccessibilityGroupRole },
+	 { "NSAccessibilityRadioGroupRole", &NSAccessibilityRadioGroupRole },
+	 { "NSAccessibilityListRole", &NSAccessibilityListRole },
+	 { "NSAccessibilityScrollBarRole", &NSAccessibilityScrollBarRole },
+	 { "NSAccessibilityValueIndicatorRole", &NSAccessibilityValueIndicatorRole },
+	 { "NSAccessibilityImageRole", &NSAccessibilityImageRole },
+	 { "NSAccessibilityMenuBarRole", &NSAccessibilityMenuBarRole },
+	 { "NSAccessibilityMenuRole", &NSAccessibilityMenuRole },
+	 { "NSAccessibilityMenuItemRole", &NSAccessibilityMenuItemRole },
+	 { "NSAccessibilityColumnRole", &NSAccessibilityColumnRole },
+	 { "NSAccessibilityRowRole", &NSAccessibilityRowRole },
+	 { "NSAccessibilityToolbarRole", &NSAccessibilityToolbarRole },
+	 { "NSAccessibilityBusyIndicatorRole", &NSAccessibilityBusyIndicatorRole },
+	 { "NSAccessibilityProgressIndicatorRole", &NSAccessibilityProgressIndicatorRole },
+	 { "NSAccessibilityRelevanceIndicatorRole", &NSAccessibilityRelevanceIndicatorRole },
+	 { "NSAccessibilityWindowRole", &NSAccessibilityWindowRole },
+	 { "NSAccessibilityWindowTitleRole", &NSAccessibilityWindowTitleRole },
+	 { "NSAccessibilityWindowProxyRole", &NSAccessibilityWindowProxyRole },
+	 { "NSAccessibilityDrawerRole", &NSAccessibilityDrawerRole },
+	 { "NSAccessibilitySystemWideRole", &NSAccessibilitySystemWideRole },
+	 { "NSAccessibilityOutlineRole", &NSAccessibilityOutlineRole },
+	 { "NSAccessibilityIncrementorRole", &NSAccessibilityIncrementorRole },
+	 { "NSAccessibilityBrowserRole", &NSAccessibilityBrowserRole },
+	 { "NSAccessibilityComboBoxRole", &NSAccessibilityComboBoxRole },
+	 { "NSAccessibilitySplitGroupRole", &NSAccessibilitySplitGroupRole },
+	 { "NSAccessibilitySplitterRole", &NSAccessibilitySplitterRole },
+	 { "NSAccessibilityColorWellRole", &NSAccessibilityColorWellRole },
+	 { "NSAccessibilityGrowAreaRole", &NSAccessibilityGrowAreaRole },
+	 { "NSAccessibilitySheetRole", &NSAccessibilitySheetRole },
+	 { "NSAccessibilityUnknownSubrole", &NSAccessibilityUnknownSubrole },
+	 { "NSAccessibilityCloseButtonSubrole", &NSAccessibilityCloseButtonSubrole },
+	 { "NSAccessibilityZoomButtonSubrole", &NSAccessibilityZoomButtonSubrole },
+	 { "NSAccessibilityMinimizeButtonSubrole", &NSAccessibilityMinimizeButtonSubrole },
+	 { "NSAccessibilityToolbarButtonSubrole", &NSAccessibilityToolbarButtonSubrole },
+	 { "NSAccessibilityTableRowSubrole", &NSAccessibilityTableRowSubrole },
+	 { "NSAccessibilityOutlineRowSubrole", &NSAccessibilityOutlineRowSubrole },
+	 { "NSAccessibilitySecureTextFieldSubrole", &NSAccessibilitySecureTextFieldSubrole },
+
 	/* From: NSActionCell.h */
 
 	/* From: NSAffineTransform.h */
 
+	/* From: NSAppleScriptExtensions.h */
+
 	/* From: NSApplication.h */
 	 { "NSModalPanelRunLoopMode", &NSModalPanelRunLoopMode },
 	 { "NSEventTrackingRunLoopMode", &NSEventTrackingRunLoopMode },
 	 { "NSKernAttributeName", &NSKernAttributeName },
 	 { "NSLinkAttributeName", &NSLinkAttributeName },
 	 { "NSCharacterShapeAttributeName", &NSCharacterShapeAttributeName },
+	 { "NSGlyphInfoAttributeName", &NSGlyphInfoAttributeName },
 	 { "NSPlainTextDocumentType", &NSPlainTextDocumentType },
 	 { "NSRTFTextDocumentType", &NSRTFTextDocumentType },
 	 { "NSRTFDTextDocumentType", &NSRTFDTextDocumentType },
 	 { "NSImageCacheException", &NSImageCacheException },
 	 { "NSNibLoadingException", &NSNibLoadingException },
 	 { "NSBrowserIllegalDelegateException", &NSBrowserIllegalDelegateException },
+	 { "NSAccessibilityException", &NSAccessibilityException },
 
 	/* From: NSEvent.h */
 
 
 	/* From: NSFormCell.h */
 
+	/* From: NSGlyphInfo.h */
+
 	/* From: NSGraphics.h */
 	 { "NSCalibratedWhiteColorSpace", &NSCalibratedWhiteColorSpace },
 	 { "NSCalibratedBlackColorSpace", &NSCalibratedBlackColorSpace },
 	 { "NSPICTPboardType", &NSPICTPboardType },
 	 { "NSURLPboardType", &NSURLPboardType },
 	 { "NSPDFPboardType", &NSPDFPboardType },
+	 { "NSVCardPboardType", &NSVCardPboardType },
+	 { "NSFilesPromisePboardType", &NSFilesPromisePboardType },
 	 { "NSGeneralPboard", &NSGeneralPboard },
 	 { "NSFontPboard", &NSFontPboard },
 	 { "NSRulerPboard", &NSRulerPboard },
 	/* From: NSPrinter.h */
 
 	/* From: NSPrintInfo.h */
+	 { "NSPrintSpoolJob", &NSPrintSpoolJob },
+	 { "NSPrintPreviewJob", &NSPrintPreviewJob },
+	 { "NSPrintSaveJob", &NSPrintSaveJob },
+	 { "NSPrintCancelJob", &NSPrintCancelJob },
 	 { "NSPrintPaperName", &NSPrintPaperName },
 	 { "NSPrintPaperSize", &NSPrintPaperSize },
-	 { "NSPrintFormName", &NSPrintFormName },
-	 { "NSPrintMustCollate", &NSPrintMustCollate },
 	 { "NSPrintOrientation", &NSPrintOrientation },
+	 { "NSPrintScalingFactor", &NSPrintScalingFactor },
 	 { "NSPrintLeftMargin", &NSPrintLeftMargin },
 	 { "NSPrintRightMargin", &NSPrintRightMargin },
 	 { "NSPrintTopMargin", &NSPrintTopMargin },
 	 { "NSPrintVerticallyCentered", &NSPrintVerticallyCentered },
 	 { "NSPrintHorizontalPagination", &NSPrintHorizontalPagination },
 	 { "NSPrintVerticalPagination", &NSPrintVerticalPagination },
-	 { "NSPrintScalingFactor", &NSPrintScalingFactor },
+	 { "NSPrintPrinter", &NSPrintPrinter },
+	 { "NSPrintCopies", &NSPrintCopies },
 	 { "NSPrintAllPages", &NSPrintAllPages },
-	 { "NSPrintReversePageOrder", &NSPrintReversePageOrder },
 	 { "NSPrintFirstPage", &NSPrintFirstPage },
 	 { "NSPrintLastPage", &NSPrintLastPage },
-	 { "NSPrintCopies", &NSPrintCopies },
-	 { "NSPrintPagesPerSheet", &NSPrintPagesPerSheet },
-	 { "NSPrintJobFeatures", &NSPrintJobFeatures },
-	 { "NSPrintPaperFeed", &NSPrintPaperFeed },
-	 { "NSPrintManualFeed", &NSPrintManualFeed },
-	 { "NSPrintPrinter", &NSPrintPrinter },
+	 { "NSPrintMustCollate", &NSPrintMustCollate },
+	 { "NSPrintReversePageOrder", &NSPrintReversePageOrder },
 	 { "NSPrintJobDisposition", &NSPrintJobDisposition },
 	 { "NSPrintSavePath", &NSPrintSavePath },
+	 { "NSPrintFormName", &NSPrintFormName },
+	 { "NSPrintJobFeatures", &NSPrintJobFeatures },
+	 { "NSPrintManualFeed", &NSPrintManualFeed },
+	 { "NSPrintPagesPerSheet", &NSPrintPagesPerSheet },
+	 { "NSPrintPaperFeed", &NSPrintPaperFeed },
+	 { "NSPrintFaxCoverSheetName", &NSPrintFaxCoverSheetName },
+	 { "NSPrintFaxHighResolution", &NSPrintFaxHighResolution },
+	 { "NSPrintFaxModem", &NSPrintFaxModem },
 	 { "NSPrintFaxReceiverNames", &NSPrintFaxReceiverNames },
 	 { "NSPrintFaxReceiverNumbers", &NSPrintFaxReceiverNumbers },
+	 { "NSPrintFaxReturnReceipt", &NSPrintFaxReturnReceipt },
 	 { "NSPrintFaxSendTime", &NSPrintFaxSendTime },
+	 { "NSPrintFaxTrimPageEnds", &NSPrintFaxTrimPageEnds },
 	 { "NSPrintFaxUseCoverSheet", &NSPrintFaxUseCoverSheet },
-	 { "NSPrintFaxCoverSheetName", &NSPrintFaxCoverSheetName },
-	 { "NSPrintFaxReturnReceipt", &NSPrintFaxReturnReceipt },
-	 { "NSPrintFaxHighResolution", &NSPrintFaxHighResolution },
-	 { "NSPrintFaxTrimPageEnds", &NSPrintFaxTrimPageEnds },
-	 { "NSPrintFaxModem", &NSPrintFaxModem },
-	 { "NSPrintSpoolJob", &NSPrintSpoolJob },
 	 { "NSPrintFaxJob", &NSPrintFaxJob },
-	 { "NSPrintPreviewJob", &NSPrintPreviewJob },
-	 { "NSPrintSaveJob", &NSPrintSaveJob },
-	 { "NSPrintCancelJob", &NSPrintCancelJob },
 
 	/* From: NSPrintOperation.h */
 	 { "NSPrintOperationExistsException", &NSPrintOperationExistsException },
 
 	/* From: NSPrintPanel.h */
+	 { "NSPrintPhotoJobStyleHint", &NSPrintPhotoJobStyleHint },
 
 	/* From: NSProgressIndicator.h */
 

File pyobjc/Modules/Cocoa/_Fnd_Enum.inc

  * Enumeration constants. This file is generated from files in
  * /System/Library/Frameworks/Foundation.framework/Headers
  */
-struct inttable enum_table[] = {
+static struct inttable enum_table[] = {
 
 	/* From: Foundation.h */
 
 
 	/* From: NSAppleEventManager.h */
 
+	/* From: NSAppleScript.h */
+
 	/* From: NSArchiver.h */
 
 	/* From: NSArray.h */
 
 	/* From: NSJavaSetup.h */
 
+	/* From: NSKeyedArchiver.h */
+
 	/* From: NSKeyValueCoding.h */
 
 	/* From: NSLock.h */
 
 	/* From: NSMethodSignature.h */
 
+	/* From: NSNetServices.h */
+	 { "NSNetServicesUnknownError", NSNetServicesUnknownError },
+	 { "NSNetServicesCollisionError", NSNetServicesCollisionError },
+	 { "NSNetServicesNotFoundError", NSNetServicesNotFoundError },
+	 { "NSNetServicesActivityInProgress", NSNetServicesActivityInProgress },
+	 { "NSNetServicesBadArgumentError", NSNetServicesBadArgumentError },
+	 { "NSNetServicesCancelledError", NSNetServicesCancelledError },
+	 { "NSNetServicesInvalidError", NSNetServicesInvalidError },
+
 	/* From: NSNotification.h */
 
 	/* From: NSNotificationQueue.h */
 
 	/* From: NSObject.h */
 
+	/* From: NSObjectScripting.h */
+
 	/* From: NSPathUtilities.h */
 	 { "NSApplicationDirectory", NSApplicationDirectory },
 	 { "NSDemoApplicationDirectory", NSDemoApplicationDirectory },
 	 { "NSDeveloperDirectory", NSDeveloperDirectory },
 	 { "NSUserDirectory", NSUserDirectory },
 	 { "NSDocumentationDirectory", NSDocumentationDirectory },
+	 { "NSDocumentDirectory", NSDocumentDirectory },
 	 { "NSAllApplicationsDirectory", NSAllApplicationsDirectory },
 	 { "NSAllLibrariesDirectory", NSAllLibrariesDirectory },
 	 { "NSUserDomainMask", NSUserDomainMask },
 
 	/* From: NSProcessInfo.h */
 
+	/* From: NSPropertyList.h */
+	 { "NSPropertyListImmutable", NSPropertyListImmutable },
+	 { "NSPropertyListMutableContainers", NSPropertyListMutableContainers },
+	 { "NSPropertyListMutableContainersAndLeaves", NSPropertyListMutableContainersAndLeaves },
+	 { "NSPropertyListOpenStepFormat", NSPropertyListOpenStepFormat },
+	 { "NSPropertyListXMLFormat_v1_0", NSPropertyListXMLFormat_v1_0 },
+	 { "NSPropertyListBinaryFormat_v1_0", NSPropertyListBinaryFormat_v1_0 },
+
 	/* From: NSProtocolChecker.h */
 
 	/* From: NSProxy.h */

File pyobjc/Modules/Cocoa/_Fnd_Str.inc

 /*
  * String constants. This file is generated from files in
- * /System/Library/Frameworks/Foundation.framework/Headers
+ * /System/Library/Frameworks/Foundation.framework/Headers/
  */
-struct stringtable string_table[] = {
+static struct stringtable string_table[] = {
 
 	/* From: Foundation.h */
 
 	/* From: NSAppleEventManager.h */
 	 { "NSAppleEventManagerWillProcessFirstEventNotification", &NSAppleEventManagerWillProcessFirstEventNotification },
 
+	/* From: NSAppleScript.h */
+	 { "NSAppleScriptErrorMessage", &NSAppleScriptErrorMessage },
+	 { "NSAppleScriptErrorNumber", &NSAppleScriptErrorNumber },
+	 { "NSAppleScriptErrorAppName", &NSAppleScriptErrorAppName },
+	 { "NSAppleScriptErrorBriefMessage", &NSAppleScriptErrorBriefMessage },
+	 { "NSAppleScriptErrorRange", &NSAppleScriptErrorRange },
+
 	/* From: NSArchiver.h */
 	 { "NSInconsistentArchiveException", &NSInconsistentArchiveException },
 
 	 { "NSFileExtensionHidden", &NSFileExtensionHidden },
 	 { "NSFileHFSCreatorCode", &NSFileHFSCreatorCode },
 	 { "NSFileHFSTypeCode", &NSFileHFSTypeCode },
+	 { "NSFileImmutable", &NSFileImmutable },
+	 { "NSFileAppendOnly", &NSFileAppendOnly },
+	 { "NSFileCreationDate", &NSFileCreationDate },
+	 { "NSFileOwnerAccountID", &NSFileOwnerAccountID },
+	 { "NSFileGroupOwnerAccountID", &NSFileGroupOwnerAccountID },
 	 { "NSFileSystemSize", &NSFileSystemSize },
 	 { "NSFileSystemFreeSize", &NSFileSystemFreeSize },
 	 { "NSFileSystemNodes", &NSFileSystemNodes },
 	 { "NSJavaWillCreateVirtualMachineNotification", &NSJavaWillCreateVirtualMachineNotification },
 	 { "NSJavaDidCreateVirtualMachineNotification", &NSJavaDidCreateVirtualMachineNotification },
 
+	/* From: NSKeyedArchiver.h */
+	 { "NSInvalidArchiveOperationException", &NSInvalidArchiveOperationException },
+	 { "NSInvalidUnarchiveOperationException", &NSInvalidUnarchiveOperationException },
+
 	/* From: NSKeyValueCoding.h */
 
 	/* From: NSLock.h */
 
 	/* From: NSMethodSignature.h */
 
+	/* From: NSNetServices.h */
+	 { "NSNetServicesErrorCode", &NSNetServicesErrorCode },
+	 { "NSNetServicesErrorDomain", &NSNetServicesErrorDomain },
+
 	/* From: NSNotification.h */
 
 	/* From: NSNotificationQueue.h */
 
 	/* From: NSObject.h */
 
+	/* From: NSObjectScripting.h */
+
 	/* From: NSPathUtilities.h */
 
 	/* From: NSPort.h */
 
 	/* From: NSProcessInfo.h */
 
+	/* From: NSPropertyList.h */
+
 	/* From: NSProtocolChecker.h */
 
 	/* From: NSProxy.h */
 	 { "NSHTTPPropertyServerHTTPVersionKey", &NSHTTPPropertyServerHTTPVersionKey },
 	 { "NSHTTPPropertyRedirectionHeadersKey", &NSHTTPPropertyRedirectionHeadersKey },
 	 { "NSHTTPPropertyErrorPageDataKey", &NSHTTPPropertyErrorPageDataKey },
+	 { "NSHTTPPropertyHTTPProxy", &NSHTTPPropertyHTTPProxy },
+	 { "NSFTPPropertyUserLoginKey", &NSFTPPropertyUserLoginKey },
+	 { "NSFTPPropertyUserPasswordKey", &NSFTPPropertyUserPasswordKey },
+	 { "NSFTPPropertyActiveTransferModeKey", &NSFTPPropertyActiveTransferModeKey },
+	 { "NSFTPPropertyFileOffsetKey", &NSFTPPropertyFileOffsetKey },
 
 	/* From: NSUserDefaults.h */
 	 { "NSGlobalDomain", &NSGlobalDomain },

File pyobjc/Modules/Cocoa/_Foundation.m

 {
 	PyObject *m, *d;
 
-	printf("Init _Foundation\n");
+	//	printf("Init _Foundation\n");
 
 	m = Py_InitModule4("_Foundation", foundation_methods, foundation_doc, 
 			NULL, PYTHON_API_VERSION);

File pyobjc/Modules/Cocoa/scripts/enum_generator.py

 
 	outfp.write("\n\t/* From: %s */\n"%os.path.basename(filename))
 
-	in_enum = False
-	in_comment = False
+	in_enum = 0
+	in_comment = 0
 
 	for ln in fp.xreadlines():
 		if not in_enum:
 				if not m:
 					continue
 				ln = ln[m.end():]
-				in_comment = False
+				in_comment = 0
 
 			if END_RE.match(ln):
 				in_enum = 0
 			ln = BLOCK_1_RE.sub('', ln)
 			m = BLOCK_S_RE.search(ln)
 			if m:
-				in_comment = True
+				in_comment = 1
 				ln = ln[:m.start()]
 
 			m = IDENT_RE.search(ln)
 	fp.write(" * Enumeration constants. This file is generated from files in\n")
 	fp.write(" * %s\n"%dirname)
 	fp.write(" */\n")
-	fp.write("struct inttable enum_table[] = {\n")
+	fp.write("static struct inttable enum_table[] = {\n")
 	fnames = [ os.path.join(dirname, fn)
 				for fn in os.listdir(dirname)
 				if fn.endswith('.h') ]

File pyobjc/Modules/Cocoa/scripts/func_collector.py

 
 	outfp.write("\n# From: %s\n"%os.path.basename(filename))
 
-	in_class = False
+	in_class = 0
 
 	for ln in fp.xreadlines():
 
 		# Skip declarations in objective-C class definitions
 		if not in_class:
 			if ln.startswith("@interface"):
-				in_class = True
+				in_class = 1
 				continue
 		else:
 			if ln.startswith("@end"):
-				in_class = False
+				in_class = 0
 			continue
 
 		m = MATCH_RE.match(ln)

File pyobjc/Modules/Cocoa/scripts/strconst_generator.py

 
 	outfp.write("\n\t/* From: %s */\n"%os.path.basename(filename))
 
-	in_class = False
+	in_class = 0
 
 	for ln in fp.xreadlines():
 
 		# Skip declarations in objective-C class definitions
 		if not in_class:
 			if ln.startswith("@interface"):
-				in_class = True
+				in_class = 1
 				continue
 		else:
 			if ln.startswith("@end"):
-				in_class = False
+				in_class = 0
 			continue
 
 		
 	fp.write(" * String constants. This file is generated from files in\n")
 	fp.write(" * %s\n"%dirname)
 	fp.write(" */\n")
-	fp.write("struct stringtable string_table[] = {\n")
+	fp.write("static struct stringtable string_table[] = {\n")
 	fnames = [ os.path.join(dirname, fn)
 				for fn in os.listdir(dirname)
 				if fn.endswith('.h') ]

File pyobjc/Modules/Cocoa/scripts/var_generator.py

 
 
 
+
 def process_file(outfp, filename, match_prefix='', ignore_list=()):
 
 	MATCH_RE=re.compile('%(match_prefix)s[ ]+(const[ ]+)?(%(IDENT)s)[ ]+(%(IDENT)s[ ]*(,[ ]*%(IDENT)s)*)[ ]*;'%{'match_prefix':match_prefix, 'IDENT':IDENT})
 
 	outfp.write("\n\t/* From: %s */\n"%os.path.basename(filename))
 
-	in_class = False
+	in_class = 0
 
 	for ln in fp.xreadlines():
 
 		# Skip declarations in objective-C class definitions
 		if not in_class:
 			if ln.startswith("@interface"):
-				in_class = True
+				in_class = 1
 				continue
 		else:
 			if ln.startswith("@end"):
-				in_class = False
+				in_class = 0
 			continue
 
 		m = MATCH_RE.search(ln)