I'm having a odd problem with an NSDocument-based application I am writing. When I first create a document and save it everything works as it should. However, when I reopen the document (which works just fine), neither "Save", "Save as" nor "Revert to saved" in the main menu seem to have any effect. The method
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
never gets called. The main menu "Close" behavior is also strange: it closes the main document window, but none of the ancillary windows. Again, this irregular behavior is only observed when the document is opened; clicking on "Close" in the main menu works as expected when the document is newly created. Other menu items, both the "Open" item and my own custom items work fine.
This is an application that was developed in Snow Leopard and then Lion, and it didn't have any problems then. I've recently upgraded to Mountain Lion, but I am not sure if the problems began there or if I did something to the project to cause the behavior. The current SDK being used to compile the app is 10.7.
Any info would be much appreciated, and thanks in advance,
c.