On your public ListViewSource constructor you can pass the parent view
controller class, and use it public methods and properties inside
RowSelected. Some OO people do not like that thing but since all framework
has this king of stuff, why do not use it.
Like:
public class myTableViewSource :UITableViewSource
{
private List<string> rows;
private ParentView parentView;
public MyTableViewSource(ParentView parentView, List<string> list)
{ rows= list;
this.parentView = parentView;
}
//========other methods
// === such as rows in section
// ====get cell
Public override void RowSelected(UITableView tableview,NSIndexPath
indexpath)
{
ShowAlert(³row selected ²,²you selected ²+rows[indexPath.Row].toString());
parentView.SelectedIndex = indexPath.Row;
parentView.ExecuteSomething (indexPath.Row);
}
//=======
Karl
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch