Elementary bindings for the UI
There are seven columns in the table view. None of them is complicated.
• check no.
These are all bound via an NSArray controller to the objects in the checkbookItemsArray in MyDocument. Some have a formatter dropped onto the cell. -date has a date formatter (naturally) and amount and balance have number formatters.
The text color of • amount is bound to isDeposit a via ColorFormatter, the binding and class definition is exactly as described previously.
The only one that is more complex is • balance. But I think I will postpone talking about that binding until I discuss the code too.
There are 3 additional UI elements bound to a dedicated class, "MyUISettings." As you'd expect, we keep them synchronized with bindings mechanism. The code is elementary. We provide reasonable default values to start with.