Objectivec bridge and pointer to pointer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Objectivec bridge and pointer to pointer

Davide Varvello-2
Objectivec bridge and pointer to pointer

Hi All,
 How can I call, from squeak, a cocoa method which has a pointer to pointer as parameter?

TIA
 Davide



Reply | Threaded
Open this post in threaded view
|

Re: Objectivec bridge and pointer to pointer

Alain Fischer
Hi Davide,

Currently, I think this is not supported. You can see the supported  
signature in:
- ObjcBridge>>coerce:to: for the parameters
- ObjcBridge>>coerce:from: for the return value
These signature are defined here:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/ 
Articles/chapter_5_section_7.html
and for exemple: a pointer to a pointer to an int "int **" will have  
"^^i" as signature.
As you see the possible signature could be very large and only the most  
common have been implemented.
You can add your needed type in one of the ObjcBridge>>coerce* method.

Alain


Le 13 févr. 06, à 11:00, Davide Varvello a écrit :

> Hi All,
>   How can I call, from squeak, a cocoa method which has a pointer to  
> pointer as parameter?
>
>  TIA
>   Davide
>


Reply | Threaded
Open this post in threaded view
|

Re: Objectivec bridge and pointer to pointer

Davide Varvello-2
Hi Alain,
You are right, it's not supported. I would have liked not to modify  
your bridge because I don't understand its internalities very well.  
By now my workaround is an objective-c method I can call from squeak  
and that invokes the method with **parameter.
If I have more news I'll post them.
Thanks again
  Davide

On 13 Feb 2006, at 22:00, Alain Fischer wrote:

> Hi Davide,
>
> Currently, I think this is not supported. You can see the supported  
> signature in:
> - ObjcBridge>>coerce:to: for the parameters
> - ObjcBridge>>coerce:from: for the return value
> These signature are defined here:
> http://developer.apple.com/documentation/Cocoa/Conceptual/ 
> ObjectiveC/Articles/chapter_5_section_7.html
> and for exemple: a pointer to a pointer to an int "int **" will  
> have "^^i" as signature.
> As you see the possible signature could be very large and only the  
> most common have been implemented.
> You can add your needed type in one of the ObjcBridge>>coerce* method.
>
> Alain
>
>
> Le 13 févr. 06, à 11:00, Davide Varvello a écrit :
>
>> Hi All,
>>   How can I call, from squeak, a cocoa method which has a pointer  
>> to pointer as parameter?
>>
>>  TIA
>>   Davide
>>
>
>