Article View: comp.sys.next.programmer
Article #855Re: Reading in .rtfd files
From: Cecil Bloch
Date: Tue, 08 Sep 1992 17:45
Date: Tue, 08 Sep 1992 17:45
25 lines
1638 bytes
1638 bytes
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...
Technical Details
Message-ID:
<1992Sep8.174524.23586@leland.Stanford.EDU>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!newsReferences:
<BtyM8D.GEt@monitor.com>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!leland.Stanford.EDU!news From: cjb@canopus.Stanford.EDU (Cecil Bloch) Subject: Re: Reading in .rtfd files Message-ID: <1992Sep8.174524.23586@leland.Stanford.EDU> Sender: news@leland.Stanford.EDU (Mr News) Reply-To: cjb@vega.stanford.edu Organization: DSO, Stanford University References: <BtyM8D.GEt@monitor.com> Date: Tue, 8 Sep 92 17:45:24 GMT Lines: 25