1. Ronald Oussoren
  2. pyobjc
  3. Issues

Issues

Issue #76 resolved

NSWorkSpace.recycleURLs_completionHandler_ - None argument not converted to "nil"

christof klaus
created an issue

The Docs say the mentioned function must be called with a list of NSURL-instances as the first argument, and the second argument may be "nil".. Passing None as second arguments throws a pyobjc-exception, because there can't be a callback constructed from NoneType..

2014-02-19 14:50:34.648 DzSrv[3184:507] <type 'exceptions.TypeError'>: Sorry, cannot create IMP for instances of type NoneType
2014-02-19 14:50:34.652 DzSrv[3184:507] (
    0   CoreFoundation                      0x00007fff8aec841c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff869efe75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8aec7fc9 -[NSException raise] + 9
    3   _objc.so                            0x0000000108fdbc61 PyObjCErr_ToObjCWithGILState + 46
    4   _objc.so                            0x0000000108fc90b5 method_stub + 4866
    5   _objc.so                            0x0000000108fbd56f ffi_closure_unix64_inner + 509
    6   _objc.so                            0x0000000108fbcc36 ffi_closure_unix64 + 70
    7   AppKit                              0x00007fff860ca348 -[NSMenuItem _corePerformAction] + 394
    8   AppKit                              0x00007fff860ca084 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 117
    9   AppKit                              0x00007fff860c91fc -[NSMenu performKeyEquivalent:] + 289
    10  AppKit                         

i guess this is a framework-wrapper bug ? but i really don't know anything about pyobjc's internals, and since documentation seems sparse.. i really wouldn't know where to start fixing this..

python 2.7.5, pyobjc 2.5.1, osx 10.9.1

Comments (3)

  1. Log in to comment