home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / next / programm / 6056 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.6 KB  |  38 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!stanford.edu!leland.Stanford.EDU!news
  3. From: cjb@canopus.Stanford.EDU (Cecil Bloch)
  4. Subject: Re: Reading in .rtfd files
  5. Message-ID: <1992Sep8.174524.23586@leland.Stanford.EDU>
  6. Sender: news@leland.Stanford.EDU (Mr News)
  7. Reply-To: cjb@vega.stanford.edu
  8. Organization: DSO, Stanford University
  9. References: <BtyM8D.GEt@monitor.com>
  10. Date: Tue, 8 Sep 92 17:45:24 GMT
  11. Lines: 25
  12.  
  13. In article <BtyM8D.GEt@monitor.com> howard@monitor.com (Howard Brenner)  
  14. writes:
  15. > Does anyone know how to read in an .rtfd file (files produced by edit  
  16. when  
  17. > graphics are involved).  I tried loading in the TXT.rtf file in the  
  18. rtfd  
  19. > directory and it loaded in the text but not the graphics. 
  20.  
  21. (1) Look at the Text class documentation - "METHODS IMPLEMENTED BY AN  
  22. EMBEDDED GRAPHIC OBJECT", towards the end of Text.rtf.
  23.  
  24. (2) Look at MiniExamples/ImageText, files GraphicImage.m and FileImage.m  
  25. in particular.
  26.  
  27. Edit inserts a directive "NextGraphic" (I think) into a rich text file to  
  28. signal the presence of an embedded graphic. Unless you have/write a custom  
  29. cell or object that can respond to that, the quick-fix solution is to use  
  30. the MiniExample App "ImageText" rather than Edit to embed the graphic in  
  31. an rtf and then use GraphicImage.h/.m in your App. Remember also to  
  32. register the directive, so the Text object knows where to go when it hits  
  33. the embedded directive:
  34. [Text registerDirective:"GraphicImage" forClass:[GraphicImage class]];
  35.  
  36. P.S. If anyone else out there knows a better way to handle this I too  
  37. would appreciate some guidance...
  38.