Hi guys,
I'm trying to figure out the best way to do the following:
I have a list of Counties in a plist file, and each county has codes associated with it. It would look something like this:
And I can't figure out how to get the values in the plist. I have other stuff that reads from plists just fine but those are just the Root, Arrays, and Strings under those arrays.
The first puzzle is am I structuring my pList in such a away that I can grab the names of the counties (Elk, Smith) and read those into a picker, and then grab the values inside the counties (they each have a different number of strings). They also have to be under a Counties array (or dictionary if thats a better way) but it has to be under a counties entry (the county under root).
Can anyone tell me if my pList is structured correctly to allow this?
I'm trying to figure out the best way to do the following:
I have a list of Counties in a plist file, and each county has codes associated with it. It would look something like this:
Code:
Root
->Counties
--->Elk County
----->Code 1
----->Code 2
----->Code 3
--->Smith County
----->Code 1
----->Code 2
----->Code 3
----->Code 4
----->Code 5
The problem is is I can't figure out how to store them in the plist so I can access the counties and the codes. I have tried many variations on the following (Including changing the main county to an array, the secondary counties to arrays, etc):
->Root
->Counties (Dictionary)
--->Elk County (Dictionary)
----->Code 1 (String)
----->Code 2 (String)
----->Code 3 (String)
--->Smith County (Dictionary)
----->Code 1 (String)
----->Code 2 (String)
----->Code 3 (String)
----->Code 4 (String)
----->Code 5 (String)
And I can't figure out how to get the values in the plist. I have other stuff that reads from plists just fine but those are just the Root, Arrays, and Strings under those arrays.
The first puzzle is am I structuring my pList in such a away that I can grab the names of the counties (Elk, Smith) and read those into a picker, and then grab the values inside the counties (they each have a different number of strings). They also have to be under a Counties array (or dictionary if thats a better way) but it has to be under a counties entry (the county under root).
Can anyone tell me if my pList is structured correctly to allow this?