Article View: comp.sys.next.programmer
Article #858Re: Reading in .rtfd files
From: Howard Brenner
Date: Tue, 08 Sep 1992 19:27
Date: Tue, 08 Sep 1992 19:27
40 lines
2106 bytes
2106 bytes
Cecil Bloch writes > In article <BtyM8D.GEt@monitor.com> howard@monitor.com (Howard Brenner) > writes: > > Does anyone know how to read in an .rtfd file (files produced by edit > when > > graphics are involved). I tried loading in the TXT.rtf file in the > rtfd > > directory and it loaded in the text but not the graphics. > > (1) Look at the Text class documentation - "METHODS IMPLEMENTED BY AN > EMBEDDED GRAPHIC OBJECT", towards the end of Text.rtf. > > (2) Look at MiniExamples/ImageText, files GraphicImage.m and FileImage.m > in particular. > > Edit inserts a directive "NextGraphic" (I think) into a rich text file to > signal the presence of an embedded graphic. Unless you have/write a custom > cell or object that can respond to that, the quick-fix solution is to use > the MiniExample App "ImageText" rather than Edit to embed the graphic in > an rtf and then use GraphicImage.h/.m in your App. Remember also to > register the directive, so the Text object knows where to go when it hits > the embedded directive: > [Text registerDirective:"GraphicImage" forClass:[GraphicImage class]]; > > P.S. If anyone else out there knows a better way to handle this I too > would appreciate some guidance... I tried it out and it works (sort of). I found that I had to disable the ButtonCell so I would not get a "Text does not recognize sendAction:to:" message. I also noticed that some text around the ButtonCell turned grey when I scroll the text (odd). But it does work. I also noticed that V3.0 has a readRTFD: method for the Text object (doesn't much help with 2.X though) thanks!
Technical Details
Message-ID:
<Bu9y1C.5Lp@monitor.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!tmc!howardReferences:
<1992Sep8.174524.23586@leland.Stanford.EDU>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!tmc!howard From: howard@monitor.com (Howard Brenner) Subject: Re: Reading in .rtfd files Message-ID: <Bu9y1C.5Lp@monitor.com> Sender: howard@monitor.com (Howard Brenner) Reply-To: howard@monitor.com (Howard Brenner) Organization: Monitor Company / IE References: <1992Sep8.174524.23586@leland.Stanford.EDU> Date: Tue, 8 Sep 1992 19:27:11 GMT Lines: 40