Re: Disabling Display of JPG and PDF Files in NSTextView
Re: Disabling Display of JPG and PDF Files in NSTextView
- Subject: Re: Disabling Display of JPG and PDF Files in NSTextView
- From: Douglas Davidson <email@hidden>
- Date: Wed, 14 Sep 2005 18:07:09 -0700
On Sep 14, 2005, at 2:40 PM, Kirt Cathey wrote:
First of all, thanks for helping out. Everything works without any
changes to the attachment cell, however, pdf and jpg do not appear
as icons -- they show up as opened images.
None of the text storage features are changed. Am just trying to
store those particular files as icons. Other files whose cells I do
not change -- Word, Excel -- work great.
I'm afraid I don't understand when you are calling this code, how you
are importing attachments into your text, how you are storing your
text, and so on. It's difficult to diagnose this without more context.
As for glyphs, a glyph is a single displayable element in a
particular font. Glyphs often match up on a one-to-one basis with
characters, but not always--for example, the characters "fi" may be
displayed with a single fi ligature glyph in certain fonts; in some
cases a single character may require more than one glyph. In
addition, glyphs can be inserted without corresponding characters--
for example, hyphen glyphs in automatically hyphenated text.
The primary job of the text system is to convert the characters and
attributes in the text storage into a list of glyphs and positions in
the various text containers, so that the text views can be displayed.
For most glyphs, we call upon Quartz to perform the display. In the
case of attachments, however, a placeholder glyph value
(NSControlGlyph) is used, and at display time the text attachment
cell is called upon to draw itself in the appropriate region.
None of this really has anything to do with how the text is saved;
that is entirely a function of the text storage.
Douglas Davidson
_______________________________________________
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