Some challenge hints would have helped


#1

Adam, the challenge is summative - a good thing, at this point in the book, to have the reader look back and try to bring to mind what they have been taught. But there is sufficient variation for novel arrangements to be necessary, and (this is feedback) I would have liked a few hints to dispel the confusion I felt as I started; the readers are still novices at this point, after all.

Clearly, if the program is to save and restore a data structure (recording the positions and sizes of the ovals), then a document-based application comes to mind, for which a hint is probably not necessary. Then I realised that I couldn’t simply store the positions and sizes of the ovals directly as NSRects. (I’m trying not to write too many spoilers.) I eventually stumbled across the NSau* class in the Apple documentation (it’s not in the book text - at least, not in the index) and - somewhat later - simpler methods for setting and retrieving a stored NSRect than the ones I first found.

I couldn’t think how to use a controller, so I looked at the suggested solution, and found to my surprise that it used no controller either. Is this good MVC practice? If so, a hint, e.g. “You don’t need a controller, just have your View obtain the model data from the Document with ‘*****’” would have helped. Also, the trick in the suggested solution with the line widths is worthy of a hint.