Ian Beck | 4 Jul 18:12 2009

Re: Calling methods with variable arguments

Thanks, Dirk.  I believe that's exactly what I need if I'm going to  
figure out how to get this darn method working.

Ian

On Jul 4, 2009, at 6:07 AM, Dirk Stoop wrote:

> Hi Ian,
>
> I'm not completely clear on the technical details of how  
> BridgeSupport definitions are used in PyObjC, but here's some  
> possible pointers:
>
> search for "withObjects" in the file linked below and you'll find  
> the exceptions defined for NSArray.arrayWithObjects: and other  
> similar methods:
>> http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-framework-Cocoa/Exceptions/Foundation.bridgesupport
>
>
> This test file shows how to explicitely add metadata to a class  
> description at runtime:
>> http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-core/PyObjCTest/test_metadata_py.py
>
>
> The example at line 45 seems to do something similar to what you need:
>
>    objc.registerMetaDataForSelector("OC_MetaDataTest",  
> "makeObjectArray:on:",
>            dict(
>                arguments={
(Continue reading)

Ronald Oussoren | 6 Jul 09:00 2009
Picon

Re: Calling methods with variable arguments


On 4 Jul, 2009, at 18:12, Ian Beck wrote:

> Thanks, Dirk.  I believe that's exactly what I need if I'm going to
> figure out how to get this darn method working.

I'd advise you to use "objc.registerMetaDataForSelector" option unless  
you have a lot more metadata to specify. The bridgesupport files are a  
slightly enhanced version of the files generated by gen_bridge_metadata 
(1),  but sadly enough the PyObjC tools for creating and maintaining  
these files are more or less broken at the moment.

Ronald

>
> Ian
>
> On Jul 4, 2009, at 6:07 AM, Dirk Stoop wrote:
>
>> Hi Ian,
>>
>> I'm not completely clear on the technical details of how
>> BridgeSupport definitions are used in PyObjC, but here's some
>> possible pointers:
>>
>> search for "withObjects" in the file linked below and you'll find
>> the exceptions defined for NSArray.arrayWithObjects: and other
>> similar methods:
>>> http://svn.red-bean.com/pyobjc/trunk/pyobjc/pyobjc-framework-Cocoa/Exceptions/Foundation.bridgesupport
>>
(Continue reading)


Gmane