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

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!tmc!howard
  3. From: howard@monitor.com (Howard Brenner)
  4. Subject: Re: Reading in .rtfd files
  5. Message-ID: <Bu9y1C.5Lp@monitor.com>
  6. Sender: howard@monitor.com (Howard Brenner)
  7. Reply-To: howard@monitor.com (Howard Brenner)
  8. Organization: Monitor Company / IE
  9. References: <1992Sep8.174524.23586@leland.Stanford.EDU>
  10. Date: Tue, 8 Sep 1992 19:27:11 GMT
  11. Lines: 40
  12.  
  13. Cecil Bloch writes
  14. > In article <BtyM8D.GEt@monitor.com> howard@monitor.com (Howard Brenner)  
  15. > writes:
  16. > > Does anyone know how to read in an .rtfd file (files produced by edit  
  17. > when  
  18. > > graphics are involved).  I tried loading in the TXT.rtf file in the  
  19. > rtfd  
  20. > > directory and it loaded in the text but not the graphics. 
  21. > (1) Look at the Text class documentation - "METHODS IMPLEMENTED BY AN  
  22. > EMBEDDED GRAPHIC OBJECT", towards the end of Text.rtf.
  23. > (2) Look at MiniExamples/ImageText, files GraphicImage.m and FileImage.m  
  24. > in particular.
  25. > Edit inserts a directive "NextGraphic" (I think) into a rich text file  
  26. to  
  27. > signal the presence of an embedded graphic. Unless you have/write a  
  28. custom  
  29. > cell or object that can respond to that, the quick-fix solution is to  
  30. use  
  31. > the MiniExample App "ImageText" rather than Edit to embed the graphic in  
  32. > an rtf and then use GraphicImage.h/.m in your App. Remember also to  
  33. > register the directive, so the Text object knows where to go when it  
  34. hits  
  35. > the embedded directive:
  36. > [Text registerDirective:"GraphicImage" forClass:[GraphicImage class]];
  37. > P.S. If anyone else out there knows a better way to handle this I too  
  38. > would appreciate some guidance...
  39.  
  40. I tried it out and it works (sort of).  I found that I had to disable the  
  41. ButtonCell so I would not get a "Text does not recognize sendAction:to:"  
  42. message.  I also noticed that some text around the ButtonCell turned grey  
  43. when I scroll the text (odd).  But it does work.
  44.  
  45. I also noticed that V3.0 has a readRTFD: method for the Text object  
  46. (doesn't much help with 2.X though)
  47.  
  48. thanks!
  49.