views:

63

answers:

0

In my RubyCocoa project I am passing a block as a callback function, one of whose parameters is declared as type void *. I know that that the actual type is char *[]. My block is receiving an instance of ObjcPtr but I have been unable to access all elements within the array. The array's size is known, and passed in via another parameter.

I'm guessing that the solution involves ObjcPtr#cast_as, however I can find no documentation for this method other than these test cases. Having played around with the various encodings the best I've come up with is my_obj.cast_as('^*'), which returns the first string from the array.

Any help would be greatly appreciated.