• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Please help?...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Please help?...
      • From: Scott Anguish <email@hidden>
  • Prev by Date: Re: Quartz call to generate shadows?
  • Next by Date: Managing non-compiled files in project builder
  • Previous by thread: Re: getting info from network computer
  • Next by thread: Re: Please help?...
  • Index(es):
    • Date
    • Thread