- (void)setChartData:(B4IAray *)xValues :(B4IArray *)yValues{
for (int i = 0; i < xValues.Lenght; i++){
''''How do i get each element of the xValues array and the yValues Array
''' xValues[i] doesn't work
}
}
I'm trying to pass an array of double values to the function above, but how do i access each element in the arrays from within Objective C, i'm not too familiar with Arrays in Xcode.
This worked for me, after a bit of trial-and-error.
Test function:
Sub testIt
Dim no As NativeObject = Me
Dim myArray() As Double = Array As Double(1.23,4.56,7.89)
no.RunMethod("myTestFunc:", Array(myArray))
End Sub
#if OBJC
-(void)myTestFunc: (B4IArray* )myData
{
NSMutableArray *numArray = myData.objectsData;
NSLog(@"Hello: %f", [[numArray objectAtIndex:0]doubleValue]);
}
#End If