Please help?...
Please help?...
- Subject: Please help?...
- From: Albert Atkinson <email@hidden>
- Date: Thu, 21 Feb 2002 21:23:50 -0500
Hello!
I am trying to implement a simple saving and loading of rtf files in my
app. I have the following code in my "Document.m" file:
#import "Document.h"
@implementation Document
- (NSString *)windowNibName
{
return @"Document";
}
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
}
- (NSData *)dataRepresentationOfType:(NSString *)aType {
NSAssert([aType isEqualToString:@"rtf"], @"Unknown type");
return [textView RTFFromRange:NSMakeRange(0, [[textView textStorage]
length])];
}
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType {
NSAssert([aType isEqualToString:@"rtf"], @"Unknown type");
fileContents = [data copyWithZone:[self zone]];
return YES;
}
@end
I must be doing something wrong because this does not work. Any
suggestions?
Thanks!
Albert
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.