iOSTableRowAction question

Why is it only possible to use iOSTableRowAction when the iOSTable is linked to a DataSource?
There are plenty of reasons/examples for using an iOSTable without linking the data to a DataSource but still need the iOSTableRowAction.

Or am I missing something?

There seem to be more events in the iOSTable class.$RowAction

Somebody explained to me that the option to use an iOSTable without a DataSource was really only added to make tables more “Xojo-like”; i.e. easy to implement. When you look at how tables are implemented in Interface Builder using Obj-C or Swift, they raise events when they require data, etc, which is analogous to the DataSource interface method used in Xojo.

In Swift you can also add cells without using the Datasource. :slight_smile: No difference with Xojo.

Ah, fair enough. I use tables for data entry and for my settings view so using a DataSource initially seemed like overkill to me as well. But I found that I could refactor my views quickly by implementing the DataSource interface in the view itself and then moving my previous “Setup” (table filling) code into the RowData method with few changes. I did this just for consistency in my app.

And under the hood, it’s still a datasource. They’re just managing it for you, just like Xojo.

In that case my question remains unanswered. :slight_smile:

So the problem is that the event is called on-the-fly when a user swipes left or right on a row, so it really needs an event to go to and that’s more conducive to a datasource.

To be honest you’ll have better luck using a datasource with iOSTables in the long run anyway because they allow you to update rows as new data comes in.