update a text-list
[1/4] from: rene:villa-cossio at: 18-Apr-2001 16:15
Hi there,
how can I change the data from a text-list.
My code don't work...
view layout [
t1: text-list data ["1" "2" "3"]
b1: button "click" [t1/data: ["a" "b" "c"] show t1 ]
]
After pressing the button b1, the old (1,2,3) data is still in the text-list
cu
Rene
--
Rene Schrader-Boelsche [rene--villa-cossio--com]
Dellbruecker Steinweg 10 +49 (0)221 680-9990
D-510690 Cologne
[2/4] from: chris:langreiter at: 18-Apr-2001 18:19
> how can I change the data from a text-list.
view layout [
t1: text-list data ["1" "2" "3"]
b1: button "click" [clear t1/data append t1/data ["a" "b" "c"] show t1]
]
- c
[3/4] 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
[4/4] from: reboler:programmer at: 18-Apr-2001 14:57
Try changing "t1/data" to "t1/lines"
------Original Message------
From: [rene--villa-cossio--com]
To: REBOL Mail List <[rebol-list--rebol--com]>
Sent: April 18, 2001 2:15:31 PM GMT
Subject: [REBOL] update a text-list
Hi there,
how can I change the data from a text-list.
My code don't work...
view layout [
t1: text-list data ["1" "2" "3"]
b1: button "click" [t1/data: ["a" "b" "c"] show t1 ]
]
After pressing the button b1, the old (1,2,3) data is still in the text-list
cu
Rene
--
Rene Schrader-Boelsche [rene--villa-cossio--com]
Dellbruecker Steinweg 10 +49 (0)221 680-9990
D-510690 Cologne