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: "Kirt Cathey" <email@hidden>
- Date: Thu, 15 Sep 2005 19:10:21 +0000
Douglas,
It's early in the morning, but I have a cup of coffee and NPR internet
radio, so I am in much better spirit than yesterday. One more question,
then let's close the thread and get on with life.
I agree that I should just apply it to all attachments, and going that
route. Even considered subclassing NSTextAttachmentCell, then subclassing
NSTextView to use that subclassed cell consistently, but want to avoid
that... for time reasons.
When I specify and NSTextAttachmentCell for the data to be displayed in,
none of the data that is stored in the NSTextView is preserved so that when
I re-open the document, the icons appear. However, when I go the regular
route without specifying a custom NSTextAttachmentCell (with Excel or Word
files, for example) all of the icon data and filewrapper data is preserved.
What is the defference in the way that NSTextView (or NSCoder?) handles
these two different scenarios?
Thanks again.
-------------------------
Kirt S. Cathey
http://www.bizolutions.com
-------------------------
From: Douglas Davidson <email@hidden>
To: Kirt Cathey <email@hidden>
CC: email@hidden, email@hidden
Subject: Re: Disabling Display of JPG and PDF Files in NSTextView
Date: Thu, 15 Sep 2005 09:41:11 -0700
On Sep 15, 2005, at 3:46 AM, Kirt Cathey wrote:
Awesome! Thanks alot for the help, and the extra 'magic number'
kicker is much appreciated.
This works. Okay, now we have a solution saved to the mailing list
archive.
I think I should be clear about the actual behavior of
NSTextAttachment. The default behavior, if no NSTextAttachmentCell
is explicitly set for the attachment, is that NSTextAttachment will
create a cell as it sees fit based on its understanding of the
contents of the associated file wrapper. Currently this includes
special treatment for images, movies, sounds, animated gifs, and
PDFs. Please file an enhancement request for an option to control
this behavior at the text view level, and we will consider it for
future releases. In the meantime, if you want to all attachments to
be displayed using icons, you should probably apply the same
treatment to all attachments regardless of file type.
Douglas Davidson
_________________________________________________________________
ウィルス駆除も無料の 「MSN Hotmail」 http://www.hotmail.com/
_______________________________________________
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