• 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
How do I read RTFD files into a view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How do I read RTFD files into a view?


  • Subject: How do I read RTFD files into a view?
  • From: "Alan Smith" <email@hidden>
  • Date: Wed, 24 May 2006 18:29:10 -0400

I can't get an NSView to replace its contents with the contents of a
RTFD file. I tracked the problem and it's that the NSData pointer
never loads the data.

  NSData *rtfdData;
  if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])
  {
      rtfdData = [NSData dataWithContentsOfFile:filePath];
      NSLog(@"file does exist");
  }
  [helpViewer replaceCharactersInRange:NSMakeRange(0, [[helpViewer
string] length]) withRTFD:rtfdData];
  NSLog(@"help file loaded: %@", filePath);

filePath is the path of the file I want it to load. :) helpViewer is a
NSTevtView. When I run this it does print out "file does exists but
can't load the data. What's up with that?

Also, how do I load an array of paths made from the contents of a
folder excluding the RTFD subpaths? The folders contents would be RTFD
files but I don't want the '.typeAttributes.dict' and all the other
files inside a RTFD file to be in my array.

Thanks, Alan

--
// Quotes from yours truly -------------------------
"You don't forget, you just don't remember."
"Maturity resides in the mind."
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How do I read RTFD files into a view?
      • From: Jim Correia <email@hidden>
    • Re: How do I read RTFD files into a view?
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Linking to frameworks with spaces
  • Next by Date: Re: How do I read RTFD files into a view?
  • Previous by thread: Linking to frameworks with spaces
  • Next by thread: Re: How do I read RTFD files into a view?
  • Index(es):
    • Date
    • Thread