[comp.sys.mac.programmer] Styled TextEdit

Jim.Russell@p395.f421.n109.z1.Fidonet.Org (Jim Russell) (04/22/91)

When I changed a TEPaste to a TEStylPaste to try to upgrade to styled TE, I found my paste behavior had not changed, and no style information was preserved in the paste. I thought I understood that TECut and TECopy would preserve a "styl" scrap type when called with a styled TE record, but (according to clipboard magician) all I have on the scrap after a copy is a TEXT scrap.
My TE record was created with TEStylNew, and I can change the style of a selection, but I can't move text around and preserve its style.  Can someone tell me what I have overlooked?

Also - is there a convention for preserving the style record? A "styl" resource containing a StScrpRec perhaps??

Thanks - sorry for the dumb questions.
 * Origin: Gaithersburg MD (1:109/421.395)

kpottie@icarus.cs.kuleuven.ac.be (Pottie Karl) (06/05/91)

I'll be putting TextEdit styles into my (editor-like) app. I
was wondering if there is any standard on how to save the styles?
I.e. is there a 'standard' resource number for the style resource ?

I haven't seen any apps yet which used TextEdit styles, and saved
the Text in the data fork and the styles in the resource fork.
Could you point me to such apps, so that I can make my app
compatible with the 'standards' ?

Karl

kaufman@neon.Stanford.EDU (Marc T. Kaufman) (06/05/91)

kpottie@icarus.cs.kuleuven.ac.be (Pottie Karl) writes:

>I'll be putting TextEdit styles into my (editor-like) app. I
>was wondering if there is any standard on how to save the styles?
>I.e. is there a 'standard' resource number for the style resource ?

With respect to the clipboard, at any rate, save the Text as 'TEXT' and
the style information as 'styl'.

Marc Kaufman (kaufman@Neon.stanford.edu)