This is a bona fide Xcode question, not a Cocoa question. Bear with me.
I am receiving the following error message when I run my application in Xcode 5.1.1 on OS X 10.9.3 Mavericks:
"2014-06-11 05:16:21.037 <Application name>[835:303] *** Illegal NSOutlineView data source (<AWRSourceListViewController: 0x100328e30>). Must implement outlineView:numberOfChildrenOfItem:, outlineView:isItemExpandable:, outlineView:child:ofItem: and outlineView:objectValueForTableColumn:byItem:"
This is a single-window "shoebox" application. The source list (sidebar) is a standard Source List NSOutlineView-in-NSScroller object from the Xcode library controlled by my NSViewController subclass. The controller does not use bindings or NSTreeController.
Instead, the controller conforms to the NSOutlineViewDataSource protocol, and it declares this fact in its @interface part. It does in fact implement the four required outline view datasource methods, despite the Xcode error message claiming otherwise.
The application, including the source list, was working perfectly yesterday. So I wrapped up work on the view controller by making some final edits to comments in the implementation file and moving several of the methods to change their order. Then, during the final build, I received the error message quoted above. It compiled despite the error message, but when I run it, the sidebar is now empty.
I therefore wonder if something happened while I was editing comments and rearranging methods in Xcode yesterday that corrupted the project. Can anybody tell me how Xcode runs the test that results in this error message? (It isn't just checking for conformance to the protocol, because -conformToProtocol: only looks at the @interface part to see whether you declare conformance, which I do; it doesn't actually look for the datasource method implementations at run time to see whether you're lying about it.) Or suggest anything I should look for that might have gotten stuck in the project that isn't removed by clearing it or by removing the derived data?
Or should I simply write this off as a unrepairable corrupted project, and start over by creating a new project and copying my code and nib files over to it?
The online reports about this error message that I've found, taken as a whole, suggest to me a pattern of occasional errors like this despite correct code and nib file setups. That's one reason why I think this may be a case of project corruption and sent this message to the Xcode list. I have investigated every potential software issue I can think of, but I can't find a code problem or solution. I'll list the potential code issues I've already looked at in a separate message to the list in a moment. If nothing else, it may convince doubters that my final editing and cut-and-paste work did not in fact result in a simple coding error. This code should work (I know, famous last words).
|