Giving the Simple Text Editor 'Legs'
Subject:   Great Series... Didn't Work though
Date:   2001-06-04 22:13:37
From:   delaneyrm
Response to: Great Series... Didn't Work though

I suggest a recheck of your MyDocument.m file. I copied and pasted from the html file and am pretty sure that I did everything correctly. After the Build I ran SimpleTextEditor and did a SaveAs. Everything seemed OK but nothing was saved.

When I returned to Project Builder and ran SimpleTextEditor from there, SaveAs gave this error message:

"Jun 04 23:26:29 SimpleTextEditor[330] dataRepresentationOfType: is a subclass responsibility but has not been overridden."

I opened MyDocument.m and found the replacement for
- (NSData *)dataRepresentationOfType:(NSString *)aType
was missing completely! I added it back in and now all is well.

I do remember a paste on top of the selected - (BOOL)loadDataRepresentation:(NSData *)data method, and getting an error of a duplicate. I was surprised to see the original method below the one from the article. So I deleted the original method. I swear that was the only deletion I made.

So if others can find similar problems with their MyDocument.m file, would they state whether they used copy-paste? It might indicate a problem area in Project Builder.