iOSTable selection

I feel like a newbie all over again with iOS!

I have two views with a table each. First view has main categories (domain 1, domain 2, domain 3, domain 4). Second view is meant to list the sub categories from each domain based on which domain was clicked in view 1. How is this done? How do you “make a note of, or keep track of” the text or row number in a row that was clicked?

Trying to follow the EEiOS example as much as I can.

Welcome to the club. As a 15 year veteran of Xojo I feel like a newbie again myself.

I have a several videos on iOS tables for subscribers over at http://xojo.bkeeney.com/XojoTraining/. All together there are about 5 1/2 hours of iOS specific videos that might be helpful.

But the gist of it is when you make the table selection, you do a iOSView.PushTo(theNewView) and the theNewView is the details view. If you’ve set the Navigation bar up properly, it should know how to get back to the list view. I think the critical piece of information is that the views know how to work together and don’t require much coding.

Hope that helps.

Thanks Bob. It’s not the going back, it’s the going forward I need help with.

Take the following (view 1 is domain #, and view 2 is the subcategory):
Domain 1 has subcategories a, b, c
Domain 2 subcategories d, e
Domain 3 sub f, g
etc

Push Domain 2 in view 1, I only want subcategories d and e showing

I set up two tables in a sqlite db, one for Domain, and other for Subcategory
View 1 opens and populates all Domains
Push any Domain in the table, and the respected subcats populate in view 2

I’m thinking of setting up a sql statement in view 2 something like
“SELECT * FROM table WHERE Category = 'title of the row user selected from view 1 '”
Problem is, I don’t know what would go in there, or even if that is the best way to accomplish this

[quote=156330:@Bob Keeney]
I have a several videos on iOS tables for subscribers over at http://xojo.bkeeney.com/XojoTraining/. All together there are about 5 1/2 hours of iOS specific videos that might be helpful.[/quote]
I was planning on checking out your site for my training needs. I’ve been meaning to when doing desktop apps, but now feel there’s a greater need with the new platform.

Fair enough. Here’s what I would do. In the Table1.Action event I’d get the data I need:

[code]dim oCell as iOSTableCellData = me.RowData(section, row)
dim SomeData as Text = oCell.Text

dim vw as new View2 //Create new instance of view2
vw.PassData(SomeData) //Pass it some data so it can build table

self.PushTo vw //Put View2 onscreen.
[/code]
PassData is a method on View2. Do the query you need and then manually load the Table.

I suppose you could also create your own Constructor for View2 that did the same thing. I haven’t played around with Constructors much in iOS yet so I’m not aware of any pitfalls (probably none).

FWIW, this is the exact strategy in video: 15.0 iOSTable

That does the trick Bob, thank you!