def _on_row_selection(self, added, removed):

        items = self.items()
        indexes = self.table_view.selectionModel().selectedRows()
        if len(indexes):
            index = self.model.mapToSource(indexes[0])
            selected = items[index.row()]
        else:
            selected = None

        self.setx(selected = selected)
        self.ui.evaluate(self.factory.on_select, self.selected)
Handle the row selection being changed.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/table_editor.py/TableEditor._on_row_selection