Hello all,
I would be grateful for some help. I used the UI editor to create a tableview. In the custom attribute section I wrote the custom attribute:
{'delegate':curz}
Then I went on to implement the curz delegate object. The following code is adapted from what I have found on the forums while I was trying to trouble shoot this myself. I only implemented the method:
def tableview_did_select(self, tableview, section, row)
class curz (object)
def tableview_did_select(self, tableview, section, row):
tv = ui.TableView()
tv.name = self.data_source[row]
if tv.name == 'Fruits':
sub_ds = SubTableView()
tv.data_source = sub_ds
tv.delegate = sub_ds
tableview.navigation_view.push_view(tv)
else:
tv.delegate = self
tableview.navigation_view.push_view(tv)
I also have a SubTableView object
When I run my main script, I get the error:
tableview_did_select() missing 1 required positional argument: 'row'
I thought when a tableview object calls (when row is touched) the delegate method "tableview_did_select", this method gets passed all the arguments necessary by the tableview...
Any help would be appreciated