Got a ui View.
It contains a TableView and nothing else.
The view gets presented via present('sheet').
Immediately after presenting it I wait via wait_modal().
Now the user should tap on one item in the TableView and the view should close.
The closing of the view works (tableview.superview.close()) but I don't know how to transport the information about the tapped row back to the main thread so that I can work with it after the wait_modal() returns ...?
This is my delegate (with debug output):
class MyTableViewDelegate (object):
def tableview_did_select(self, tableview, section, row):
# Called when a row was selected.
print("tableview_did_select: row=", row)
print(tableview.data_source.items[row])
tableview.superview.close()
pass
Any help regarding how to get the tableview.data_source.items[row] information out of this delegate method back to my main program would be awesome! 😀