Search code examples
objective-cnsindexpathrobovm

Get row from indexPath in RoboVM


I am trying to write the following objective-c code in robovm:

   (NSIndexPath *)indexPath = ...;
   cell.textLabel.text = [tableData objectAtIndex:indexPath.row];

However, when I look thru RoboVM's calls for NSIndexPath here:
https://github.com/robovm/robovm/blob/e60579613140f4a6d48f108042633fbf17b9c289/cocoatouch/src/main/java/org/robovm/apple/foundation/NSIndexPath.java

or by scrolling thru Eclipse's options, I don't see anything corresponding to row. What can I do?


Solution

  • I have no experience with RoboVM. However, indexPath.section and indexPath.row are just convenience methods/properties for

    [indexPath indexAtPosition:0] // section
    [indexPath indexAtPosition:1] // row
    

    and the indexAtPosition: method is defined in the Java class.