[Pyobjc-dev] Blocks support in PyObjC
Brought to you by:
ronaldoussoren
|
From: Vladimir P. <far...@gm...> - 2009-10-12 07:08:49
|
Hi all,
Does PyObjC support selectors with block arguments? I'm trying to make
use of NSOpenPanel's beginSheetModalForWindow_completionHandler_, but
I'm somewhat unsure what to pass as the second argument. I've tried
creating a callback function like this:
def doneImport_(res):
print "panel","returned",res
But I'm getting <type 'exceptions.TypeError'>: Argument 3 is a block,
but no signature available
Wrapping the function with @objc.signature('vI') doesn't help either. Any hints?
--
Sincerely,
Vladimir "Farcaller" Pouzanov
http://farcaller.net/
|