Hi, try this program:
//////////////////////////////////
text: copy "" ; a new string
; when you insert into a string (which is what append does),
; the value gets converted to a string, or whatever datatype
; the first argument is. So this reduced block becomes a string.
append text reduce [
<REBEL_EMBEDLET VERSION=0.1> newline
<PROPERTIES>
]
getsize1: 200
getsize2: 100
append text rejoin [newline "SIZE=" getsize1 {,} getsize2]
append text {
BACKCOLOR=142,128,110
NOICONS=TRUE
</PROPERTIES>
}
file: %afile.txt
write file text
print read file ; read it back in to test it
delete file ; clean up
/////////////////////////
By the way, I think it's "reblet".
And it should be "REBOL_EMBEDLET".
Sounds like good stuff.
Anton.
> Hello Reboler's
> I completed a GUI parser for a java rebelet player
> (the java+activeX rebelet players' made allready)
> and i would like to know if anyone could tell me
> how to format what i print out one tag or key = value per
> line to a string or block to save as a file.
> example:
> print {<REBEL_EMBEDLET VERSION=0.1>
> <PROPERTIES>}
> PRINT rejoin["SIZE=" getsize1 {,} getsize2]
> print {BACKCOLOR=142,128,110
> NOICONS=TRUE
> </PROPERTIES>} etc.
> Calling print works but i want to save to a file.
> I need:
> <REBELEMBEDLET VERSION=1.1>
> SIZE=200x100
> BACKCOLOR=142,128,110
> NOICONS=TRUE
> </PROPERTIES> etc.
> but:
> append myblock {<REBELEMBEDLET VERSION=1.1>
> <PROPERTIES>}
> append myblock rejoin["SIZE=" getsize1 {,} getsize2]
> append myblock {BACKCOLOR=142,128,110
> NOICONS=TRUE
> </PROPERTIES>} etc.
> gives me:
> <REBELEMBEDLET VERSION=1.1>SIZE=200x100
> BACKCOLOR=142,128,110NOICONS=TRUE </PROPERTIES> etc.
> any answeres are welcome.
--
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the
subject, without the quotes.