Re: (standard additions) read file as styled text
Re: (standard additions) read file as styled text
- Subject: Re: (standard additions) read file as styled text
- From: Brennan Young <email@hidden>
- Date: Tue, 24 Apr 2001 23:17:38 +0200
- Organization: Magic Lantern
Christopher Nebel wrote:
(About the styled text class)
>
Well, yes, but it doesn't have a particularly well-defined file format,
>
and it definitely doesn't have one that only uses the data fork, which
>
is all read/write knows about. The best you can do using only standard
>
additions is to get the plain text of the file. Getting the styles
>
would involve (assuming the file is in SimpleText styled format) digging
>
the 'styl' resource out of the resource fork and combining it with the
>
raw text. I'm sure there are some scripting additions that will let you
>
do this, but I don't know what they are.
I know there are a couple of scripting additions which can extract
resources, (Akua is the one that springs most immediately to mind), and
I can work that out, but how would I go about 'combining them with the
raw text'? This sounds easier said than done.
I've been looking at
http://gemma.apple.com/techpubs/mac/Text/Text-54.html
where the process is described (in Pascal) as it relates to TextEdit,
but I'm having difficulty grasping all that is going on, and even more
seeing how it might be achieved in, say Akua, which looks as though it
might just be able.
--
_____________
Brennan