0

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?

Mayuri
  • 402
  • 6
  • 13
syzygy
  • 1,356
  • 3
  • 16
  • 28

1 Answers1

1

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.

Martin R
  • 529,903
  • 94
  • 1,240
  • 1,382
  • Thanks! I had tried this, but didn't realize position 0 was section instead of row, so I thought it didn't work, since I only have one section. Thanks for clearing that up. – syzygy May 12 '14 at 20:14