On Feb 13, 2006, at 10:44 AM, Brian O'Brien wrote:
I have an ObjectiveC class and I want to pass it data from python....
This is what I get...

in Python:

fs = (1,2,3)
k.whichSpaceIsThisClosesTo_k_(fs, 1)

in ObjectiveC

- (int) whichSpaceIsThisClosesTo:(id)testFeature k:(int)k
{
NSLog(@"testFeature %@", testFeature);
return(k);
}

And this prints out:

2006-02-13 11:37:39.078 python[518] testFeature (1, 2, 3)

Ok so in ObjectiveC how do I access the elements of testFeature?

What is being passed to ObjectiveC?

A subclass of the NSArray class cluster.  You can treat testFeature like any other NSArray instance.   Tuples will be immutable and Arrays will be mutable.

NSLog(@"testFeature %@", testFeature);

NSLog(@"testFeature %@ - %@", testFeature, [testFeature class]);

b.bum