3

I have the equivalent of 3 cascading data sources or drop down lists. Since all data has to be created up front will this be a good candidate for MonoTouch.Dialog as one item's data depends on the preceding value?

Example of what I'm trying to do: I have a list of client names and each client can have a list of projects and each project can have a list of tasks.

I like the UI of tables that MT.D creates. If MT.D is not suitable for this, what would be a good approach for getting a similar UI? Would I have to create a separate UITableView and data source for each item (Client, Project, and Plan) with only one row in it?

The UI that I'm trying to replicate is having a single rounded table cell with the type on the left (e.g. Client), an accessory indicator on the right, and once a value is selected have the value on the right.

valdetero
  • 4,624
  • 1
  • 31
  • 46

1 Answers1

1

Yes you can!. Just have a look at Touch.Unit source code on github.

It shows you the assemblies (first level), then the test fixture (second level) then the test cases (third level) and, if it fails, it will show you the failure details (on a fourth level).

All this is created dynamically when the assemblies are scanned to find [TestFixture] attributes on the types.

Even if this does not match exactly what you're looking for you'll see that customizing MonoTouch.Dialog is very easy. There are several questions (here on stackoverflow), samples (e.g. TweetStation) and tutorials on how to use it.

poupou
  • 43,413
  • 6
  • 77
  • 174
  • Thanks for your quick response; however that's not quite what I was asking for. I'm not saying that a Client will be "page 1" and navigate to Project on "page 2" and so forth. I'm saying that I have three cells on the same page and the one physically above it will filter the available values for it. – valdetero Mar 07 '12 at 00:54
  • An image is worth a 1000 words. Something like **Ringtone** from https://a248.e.akamai.net/assets.github.com/img/a8e1b2b17a72c36301194ee9c861d162702f0f3f/687474703a2f2f746972616e69612e6f72672f696d616765732f4d544469616c6f6753616d706c652e706e67 ? and when you come back from the selection *page* then you have different choices for **New Text Message**. If so it should not be an issue since each time you return to the main *page* you can recreate (or switch) the elements being used. – poupou Mar 07 '12 at 01:15
  • That is exactly what I want to do - if I change the **Ringtone** then I want to have different values for **New Text Message**. My question now is how do I change the data since I'm creating **Ringtone** and **New Text Message** cells on the Settings page before I push it on the navigation controller? – valdetero Mar 07 '12 at 18:01
  • You can regenerate your `RootElement` (or parts of it) each time your *main* `DialogViewController` appear again (e.g. override `ViewWillAppear`) based on the current state of your application (i.e. if you select a *Client* then change the **global** state then you your regenerated your `RootElement`, e.g. using the `Root` property, the only add the *Project* that are related to this client). – poupou Mar 07 '12 at 20:21
  • Thanks for your help, that's exactly what I did. Not sure if it is the best way, but I subclassed DialogViewController and RadioElement. In addition to what @poupou said, I had to pass an empty `RootElement("")` to my sub DVC to navigate to it. I also used some static fields on my DVC and my RadioElement so that I could keep track of what item was selected and then use that to filter my results using LINQ. Also the ctor for my RadioElement takes in an `NSAction` so that I can pop the controller when tapped and to store the id of the item. – valdetero Mar 07 '12 at 21:10