What about this:
put the styledText of [<chunk> of] <field> into <var>
... a binary representation (Scott: Would this be plattform independant?)
set the styledText of [<chunk> of] <field> to <expr>
so copying is done just like with the htmlText:
set the styledText of fld "A" to the styledText of fld "B"
... but without the performance hit of converting to htmlText
If delimiter parsing was doped up as suggested, setting styles in those
binary representation would be possible and still readable, and although
the normal syntax for setting the style could not be used exactly.
Say the binary representation works like this: Every line represents a
style run. The first 2 byte are the font id, then 1 byte for the style
and 1 byte for the size, followed by 3 byte for color. Finally the text
with returns as "\r" and backslashes as "\\". So:
$5x Aaq~aaa\rbbb\\ccc
1&x ~ddd
would be two style runs. The first has the font with the id 0x2435, the
style is 0x78 (whatever that may be), a size of 32 (0x20 = space), and
the color 0x659771 which is a dark slate blue. It contains two lines
"aaa" and "bbb\ccc". The second style run contains the text "ddd".
Note: This is not what i expect style runs to look like. It is only an
example, so I can make my point about defining delimiters for the binary
representation.
define styleTextRun as two bytes fontID & one byte textStyle & one
byte textSize\
& 3 byte textColor & a string text & return -- this could be predefined
put "eee" into line 2 of the text of styleTextRun 1 of myVar
set the text of styleTextRun 2 of myVar to "fff"
set the fontID of styleTextRun 1 of myVar to fontID("Helvetica")
-- fontID is a function that returns the binary indicator for a font
Ok, I know... I'm dreaming.
Regards
R�diger (getting that ethereal stare again)
--------------------------------------------------------------------
| Ruediger zu Dohna GINIT GmbH 0721-96681-63 [EMAIL PROTECTED] |
| PGP-Fingerprint: F1 BF 9D 95 57 26 48 42 FE F8 E8 02 41 1A EE 3E |
--------------------------------------------------------------------