RowData not being called

I’m on the latest Xojo version, using a class with the iOSMobileTableDataSource interface activated.

The SectionCount method has this code
return 1

The RowCount method has this code
return 3

The RowData method is not being called at all. It’s the first time I’m experiencing this problem. The same approach works in all my other apps. Anybody else with the same problem?

Have you set the iOSMobileTable’s Datasource property? For example, in the table’s Opening event:

// Set the data source
Me.DataSource = myDataSource

You say the RowData method is not being called, but in case it is, don’t forget to put “Return cell” at the end of the method. I’ve made this embarrassing mistake before.

1 Like

Thank you, while this code generates an error it led me on the right path.

This won’t work:
Me.DataSource = myDataSource

It produces a compiler error:

Expected a value of type interface iOSMobileTableDataSource, but found a static namespace reference to class myDataSource.
Me.DataSource = myDataSource

This will not work either as only the SectionCount, SectionTitle and RowCount methods are entered, not the RowData method though:
Me.DataSource = new myDataSource

This works:
Creating a property on the MobileScreen:
myDataSourceProperty As myDataSource

Then assigning the data source like this:

myDataSourceProperty = new myDataSource
Me.DataSource = myDataSourceProperty

Thank you both for your help!