Jeff,

Thanks very much worked perfectly, I have so much to learn LOL.

I was only going down the delegate route because I thought I was focusing on 
the wrong thing, the events are firing ok now.

thanks for your help.

ATB

Alex


On 9 Jun 2012, at 14:02, Jeff Stedfast wrote:

> Hi Alex,
> 
> I just took a look at my SQLiteSampleViewController and the problem is that 
> in SQLiteTableViewController.ViewDidLoad(), I am setting 
> TableView.AllowSelection to false (same for 
> SearchDisplayController.SearchResultsTableView.AllowSelection).
> 
> I think what I'll do is change those to 'true' in SQLiteTableViewController 
> as I suspect other people will likely hit this same issue and get confused. I 
> think I made them false because in the app I designed this API for, I wanted 
> to disable selection.
> 
> Also, with SQLiteTableViewController, don't create your own delegates because 
> that would override the delegates that the AllInOneTableViewController sets 
> up and will make it so that various things will not work. 
> (AllInOneTableViewController was something I wrote to eliminate the need for 
> myself to create a bunch of delegate classes)
> 
> I'll commit a fix in just a minute.
> 
> Hope that helps and sorry for the confusion,
> 
> Jeff
> 
> On Sat, Jun 9, 2012 at 4:06 AM, Alex White <[email protected]> wrote:
> I have to say the learning curve of MonoTouch has been harsh, I just keep on 
> hitting hurdles over and over again.
> 
> My next issue is RowSelected is not firing 
> 
> e.g.
> 
>       public class SampleTableViewController : 
> SQLiteTableViewController<SampleItem>
>       {
>               static NSString key = new NSString ("SampleItemCellKey");
>               
>               public SampleTableViewController (SQLiteConnection sqlitedb)
>                       : base (sqlitedb, 16) {
>               }
> 
>               protected override void RowSelected(UITableView tableView, 
> NSIndexPath indexPath) { <--- this never fires
>                       base.RowSelected(tableView, indexPath);
>               }
>               
>               // Note: This is the only method, other than the .ctor, that we 
> actually need to implement in
>               // order to have a functional SQLiteTableViewController capable 
> of displaying data from our
>               // SQLite table.
>               protected override UITableViewCell GetCell (UITableView 
> tableView, NSIndexPath indexPath, SampleItem item)
>               {
>                       var cell = tableView.DequeueReusableCell (key);
>                       if (cell == null)
>                               cell = new UITableViewCell 
> (UITableViewCellStyle.Value1, key);
>                       
>                       cell.TextLabel.Text = item.Title;
>                       cell.DetailTextLabel.Text = item.Details;
>                       
>                       return cell;
>               }
>               
>               public override bool ShouldAutorotateToInterfaceOrientation 
> (UIInterfaceOrientation toInterfaceOrientation)
>               {
>                       return true;
>               }
>       }
> 
> 
> I know it is my lack of understanding of how this stuff is structured, I am 
> more than happy reading any good documentation on this, do I need to setup my 
> own delegates?
> 
> thanks
> 
> Alex
> 
> 
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
> 
> 

_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to