Ronald Oussoren avatar Ronald Oussoren committed e7e60c6

Fix bad conversion in extract_byref_signatures: I used lookUpClass instead of getClassList when converting from the old function names
Added better signatures for [NSWorkspace getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:].

Comments (0)

Files changed (3)

pyobjc/Lib/AppKit/AppKit.byref

 ,NSTextView,getMarkedText:selectedRange:,v12@4:8^@12^{_NSRange=II}16,
 ,NSColorPickerWheelView,_pointInPicker:,c8@4:8^{_NSPoint=ff}12,
 ,NSWorkspace,_willUnmountDeviceAtPath:ok:,v12@4:8@12^i16,
-,NSWorkspace,getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:,c28@4:8@12^c16^c20^c24^@28^@32,
-,NSWorkspace,getInfoForFile:application:type:,c16@4:8@12^@16^@20,
+,NSWorkspace,getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:,c28@4:8@12^c16^c20^c24^@28^@32,c28@4:8@12o^c16o^c20o^c24o^@28o^@32
+,NSWorkspace,getInfoForFile:application:type:,c16@4:8@12^@16^@20,c16@4:8@12o^@16o^@20
 ,NSWorkspace,performFileOperation:source:destination:files:tag:,c24@4:8@12@16@20@24^i28,
 ,NSIBObjectData,_encodeMapTable:forTypes:withCoder:,v16@4:8^{_NSMapTable=}12r*16@20,
 ,NSDocument,_changeAlertDidEnd:returnCode:contextInfo:,v16@4:8@12i16^v20,v16@4:8@12i16i20
 ,NSApplication,beginModalSessionForWindow:,^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}8@4:8@12,
 ,NSApplication,beginModalSessionForWindow:relativeToWindow:,^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12@4:8@12@16,
 ,NSApplication,beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:,v24@4:8@12@16@20:24^v28,v@:@@@:i
-,NSApplication,contextID,^v4@4:8,
+,NSApplication,contextID,^v4@4:8,i4@4:8
 ,NSApplication,endModalSession:,v8@4:8^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12,
 ,NSApplication,msgPrint:ok:,i12@4:8r*12^i16,
-,NSApplication,openFile:ok:,i12@4:8@12^i16,
-,NSApplication,openTempFile:ok:,i12@4:8@12^i16,
-,NSApplication,runModalSession:,i8@4:8^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12,
+,NSApplication,openFile:ok:,i12@4:8@12^i16,i12@4:8@12o^i16
+,NSApplication,openTempFile:ok:,i12@4:8@12^i16,i12@4:8@12o^i16
+,NSApplication,runModalSession:,i8@4:8^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12,i8@4:8^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12
 ,NSCalibratedWhiteColor,newWithCoder:zone:,@12@4:8@12^{_NSZone=}16,
 ,NSCGSFont,_atsFontID,^v4@4:8,
 ,NSCGSFont,_backingCGSFont,^{CGFont=^{CGFontVTable}Ii^{CGEncoding}^{CGCMap}^{CGAdvanceSet}^{CGAdvanceSet}i^{CGFontCache}^vb1b1b1b1}4@4:8,

pyobjc/Lib/AppKit/_AppKitSignatures.py

 set_signature_for_selector("NSColor", "getHue:saturation:brightness:alpha:", "v@:o^fo^fo^fo^f")
 set_signature_for_selector("NSColor", "getRed:green:blue:alpha:", "v@:o^fo^fo^fo^f")
 set_signature_for_selector("NSColor", "getWhite:alpha:", "v@:o^fo^f")
+set_signature_for_selector("NSWorkspace", "getFileSystemInfoForPath:isRemovable:isWritable:isUnmountable:description:type:", "c28@4:8@12o^c16o^c20o^c24o^@28o^@32")
 set_signature_for_selector("NSWorkspace", "getInfoForFile:application:type:", "c16@4:8@12o^@16o^@20")
 set_signature_for_selector("NSDocument", "_changeAlertDidEnd:returnCode:contextInfo:", "v16@4:8@12i16i20")
 set_signature_for_selector("NSDocument", "_compatibility_canCloseDocumentWithDelegate:shouldCloseSelector:contextInfo:", "v16@4:8@12:16i20")
 set_signature_for_selector("NSPrintPanel", "beginSheetWithPrintInfo:modalForWindow:delegate:didEndSelector:contextInfo:", "v24@4:8@12@16@20:24i28")
 set_signature_for_selector("NSApplication", "_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:", "^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}24@4:8@12@16@20:24i28")
 set_signature_for_selector("NSApplication", "beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:", "v@:@@@:i")
+set_signature_for_selector("NSApplication", "contextID", "i4@4:8")
+set_signature_for_selector("NSApplication", "openFile:ok:", "i12@4:8@12o^i16")
+set_signature_for_selector("NSApplication", "openTempFile:ok:", "i12@4:8@12o^i16")
+set_signature_for_selector("NSApplication", "runModalSession:", "i8@4:8^{_NSModalSession=@@^{_NSModalSession}iciI^vi@@:^vi}12")

pyobjc/Scripts/extract_byref_signatures.py

 def load_bundle(path):
         NSBundle.bundleWithPath_(path).load()
 	classes = [ cls 
-		for  cls in objc.lookUpClass()
+		for  cls in objc.getClassList()
 		if path == NSBundle.bundleForClass_(cls).bundlePath() ]
 	return classes
 classes = load_bundle(sys.argv[1])
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.