Restarting...

Work and life pressure pushed this to the back burner for a while. I’m intending to use the summer holidays to get back to it, as of today.

First up, I need to re-think the data structure.:
- As currently designed, in order to edit a single diary entry, I would need to load the entire diary pList into volatile memory and then re-save it. Once the diary becomes of any significant size, this will become extremely cumbersome.
+ I need a proper database with each entry as a data item.
+This will also facilitate ‘lazy’ loading when generating the list views.
- I also committed the cardinal sin of using a more complicated data model than I actually needed.
+ I will simplify the data model so that each entry can have exactly one value per field rather than a list.

Right! To work!

First Steps

Over the Christmas break I made a couple of milestones.

1. I finally decided on the data structure. It’s a single plist Dictionary with two keyed entries, events and lists. Events is an array of Dictionaries with keyed arrays for each entry subcategory (thus allowing multiple entries in each subcategory in each event). Lists is a keyed list of arrays, holding the picker palette for each event subcategory. I populated the plist lists category and added manually 3 test events.

2. I produced the top level views complete with both navigation bar and tool bar with associated icons.

Pasted Graphic

I also designed the app icon:
Picture-Taker-VuSnBY

The first two weeks of the year have been spent with the Edit Event subview of the diary. This has been much more scratchy than I’d hoped with a day wasted with the app crashing with no error report when adding array items to an array. It turns out you can’t add NSStrings and NSMutableStrings to the same array (in fact the horrible truth is a bit more complicated - you can add exactly one NSMutableString to an array of NSStrings but that has to be the last item). The good news is that I figured it out eventually and the event detail now displays fine, although truthfully, I’m not all that happy with the look:

Pasted Graphic 1

The next step is the editable pickers for each item...

Starting Simple

As I already have my head around the plist format and how it interacts with various table views, I’ve decided to go with that for now. This is in the interests of actually producing a working piece of software over the holidays. The advice is to start small and so that’s exactly what I’m doing.

Nearing the Starting Post

I finally broke the p.403 barrier (Chapter 12) of Beginning iPhone4 Development. This is a milestone as it’s about Data Persistence, which is key to my first app. Once this one is done I should be in a position to start coding, but the choice is a hard one. plist seems like the easiest option, but SQL offers the greatest scope for data export and cross-version compatability. Decisions, decisions.