I also had a problem with this technique, but not because of any errors in Xcode.
In dataOfType:error: on my Document subclass, I implemented the following line:
[[[self tableView] window] endEditingFor:nil];
The problem that this creates is that if I launch my application with an existing document and begin editing one of the records in in my document, the autosave system kicks in after I’ve made one or two character changes. Autosave then apparently calls dataOfType in order to save the document, and -endEditingFor promptly locks the document for further editing. The result is that instead of being able to change, say, a person’s name from “John Doe” to “Jane Doe”, I get two characters typed in and then the field is locked, resulting in a new name of “Ja”.