Re: [Pyobjc-dev] Blocks support in PyObjC
Brought to you by:
ronaldoussoren
|
From: Ronald O. <ron...@ma...> - 2009-10-13 11:16:01
|
On 12 Oct, 2009, at 11:11, Ronald Oussoren wrote:
> Vladimir,
>
> Pyobjc does support blocks and you should pass a function wherever the
> obc side expects a block.
>
> Sadly enough blocks are not introspectable at runtime in the objc (or
> blocks) runtime which means we have to provide additional custom
> metadata. You seem to have found a method where we haven't done that
> yet and I'll fix that for the next release.
Guido's timemachine rules again... It turns out this was already fixed
in the repository.
Ronald
>
> Ronald
>
>
>
> On 12 okt 2009, at 09:08, Vladimir Pouzanov <far...@gm...>
> wrote:
>
>> 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/
>>
>> ---
>> ---
>> ---
>> ---------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart
>> your
>> developing skills, take BlackBerry mobile applications to market and
>> stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> Pyobjc-dev mailing list
>> Pyo...@li...
>> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> Pyobjc-dev mailing list
> Pyo...@li...
> https://lists.sourceforge.net/lists/listinfo/pyobjc-dev
|