While playing with deleting/inserting items, and resizing the window, I noticed one quirk and triggered an exception.
The quirk: if I resized a blank list to just the right size, I could see “Your document contents here” appear above the combined scroll/table view. Looking through the .xib file, I found that string associated with a TextFieldCell object; is there something to be done to avoid that?
The exception that I now see when hitting the “Insert” button seems odd; I definitely have a createNewItem: method. This appears consistently when playing with the original test document. Creating a new blank document does not result in an exception, even though the (empty array) .tdl files are the same.
(Correction: after quitting and re-launching a couple of times, I can now get this to throw an exception for the new document.)
2011-11-26 22:32:40.602 TahDoodle[7492:407] -[__NSArrayI addObject:]: unrecognized selector sent to instance 0x100215e20 2011-11-26 22:32:40.603 TahDoodle[7492:407] -[__NSArrayI addObject:]: unrecognized selector sent to instance 0x100215e20 2011-11-26 22:32:40.658 TahDoodle[7492:407] ( 0 CoreFoundation 0x00007fff8de16286 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff8943cd5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff8dea24ce -[NSObject doesNotRecognizeSelector:] + 190 3 CoreFoundation 0x00007fff8de03133 ___forwarding___ + 371 4 CoreFoundation 0x00007fff8de02f48 _CF_forwarding_prep_0 + 232 5 TahDoodle 0x00000001000012f4 -[BNRDocument createNewItem:] + 164 6 CoreFoundation 0x00007fff8de05a1d -[NSObject performSelector:withObject:] + 61 7 AppKit 0x00007fff8591d710 -[NSApplication sendAction:to:from:] + 139 8 AppKit 0x00007fff8591d642 -[NSControl sendAction:to:] + 88 9 AppKit 0x00007fff8591d56d -[NSCell _sendActionFrom:] + 137 10 AppKit 0x00007fff8591ca30 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2014 11 AppKit 0x00007fff8599c8e0 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 489 12 AppKit 0x00007fff8591b63a -[NSControl mouseDown:] + 786 13 AppKit 0x00007fff858e60e0 -[NSWindow sendEvent:] + 6306 14 AppKit 0x00007fff8587e68f -[NSApplication sendEvent:] + 5593 15 AppKit 0x00007fff85814682 -[NSApplication run] + 555 16 AppKit 0x00007fff85a9380c NSApplicationMain + 867 17 TahDoodle 0x0000000100001172 main + 34 18 TahDoodle 0x0000000100001144 start + 52
At any rate, I’ll use this as an opportunity to play with debugging to see if I can sort out what happened.
iTunes 4.2.1, Mac OS X 10.7.2, no updates pending.
Thanks, Aaron, for a fantastic book. I have a pile of older books, and I’m a reasonably experienced programmer (but not in GUI environments), and Xcode 4 + ARC had me desperate for something more up to date. Your book definitely is a good springboard. One suggestion I’d make for future editions is to find a way to visually highlight the content in the early chapters that a C programmer won’t know.