[REBOL] Re: update a text-list
From: gjones05::mail::orion::org at: 18-Apr-2001 12:15
From: "Rene Schrader-Boelsche"
> > how can I change the data from a text-list.
From: "Christian Langreiter"
> view layout [
> t1: text-list data ["1" "2" "3"]
> b1: button "click" [clear t1/data append t1/data ["a" "b" "c"] show t1]
> ]
An alternative appears to be to assign the new block to the text-list lines
path. This is demonstrated below, as well as, the way to reset the slider
for a new list that is longer than the original:
view layout [
t1: text-list 100x50 data ["1" "2" "3"]
b1: button "click" [
t1/lines: ["a" "b" "c" "d" "e" "f"] ;alternative assignment
t1/sld/redrag t1/lc / max 1 length? head t1/lines ;resets slider
show t1 ]
]
I really don't know if one method of reassigning a text-list is "preferred"
or not. Given that the slider is internally set based on /lines, I assume
it will be safe from deprecation. The documentation does not address these
points to my knowledge.
--Scott Jones