[comp.sys.mac.hypercard] Keeping styled text using put in field command

mikef@bbs.acs.unc.edu (Michael Freedburg) (05/21/91)

I have a stack with two backgrounds. In one I have a field with styled
text. I am trying to cycle through the first background, grabbing the
styled text and finally putting the styled text from all these fields
into a single field in the second background ***keeping the styles
intact***. I have done the following:
on mouseUp
go to first card of background "Info"
repeat for the number of cards in background "Info"
	put field "Names" & return after temp (a var)
	go to next card of background "Info"
end repeat
put temp into field "Data" of background "MyText"
end mouseUp
but this does not put styled text into field "Data" !!!!!
If I do the same script but now use Copy Text and Paste Text and keep
visiting the field "MyText" in the second background, all is well!!
Is it really the case that the put command does not retain styled text
or is there some other thing I need to do in order to maintain the text
as I typed it in??
Kevin Calhoun, don't desert me now!!
Jeanne Devoto, help, help, help!!
What is the story with HyperCard 2.1 and exporting styled text using the
write command?? I was corresponding with someone whose name I will not
mention at Apple who was working on XTND functions for HyperCard that
would allow us to read and write styled text to files. Is this the case,
or what extensions to the write command can we expect, considering the
extensions to the read command we have been hearing about??
Love and Peace,
mikef@samba.oit.unc.edu
mikef@next1.oit.unc.edu

jdevoto@Apple.COM (Jeanne A. E. DeVoto) (05/29/91)

In article <3850@beguine.UUCP> mikef@bbs.acs.unc.edu (Michael Freedburg) writes:
>Is it really the case that the put command does not retain styled text
>or is there some other thing I need to do in order to maintain the text
>as I typed it in??

>What is the story with HyperCard 2.1 and exporting styled text using the
>write command?

You aren't missing anything: "put" only deals with the text, not with the
styles. I have heard tales from some people to the effect that they were
working on XCMDs that would bring the style record along with the text, but
I have not seen any actual, working code that does this. Yet.

2.1 has some expansions to the write command - in particular, it lets you
write to a file starting at a specified position. But it doesn't have
anything that lets you write styled text to a file.

Copy and paste works OK for moving text styles, although it is a little
more cumbersome (and has the disadvantage that it clobbers whatever was
on the clipboard) than get/put.
-- 
========= jeanne a. e. devoto ========================================
 jdevoto@apple.com     |  You may not distribute this article under a
 jdevoto@well.sf.ca.us |  compilation copyright without my permission.
______________________________________________________________________
 Apple Computer and I are not authorized      |        CI$: 72411,165
 to speak for each other.                     |