Clovertech
› Clovertech Forums › Read Only Archives › Cloverleaf › Tcl Library › putting message back together
I am having trouble putting this message back together. I have tried a few different ways but am lost. any help. thanks.
Remove the ^ from the join command.
set newLocation [join “$floor $room $bed” $subSep]
use lreplace
set newpv1list [lreplace $PV1List $PV1location $PV1location $newLocation]
rebuild PV1 segment
set newpv1 [join $newpv1list $fldSep]
Replace old pv1 with new
set newseglist [lreplace $segList PV1pos $PV1pos $newpv1]
set msg [join $newseglist r]
I think I have all the pieces….In essence, oyu need to build and replace in the opposite order you disassembled…..Hope this helps…
Thanks Kieth, worked like a charm and easy to understand.