[REBOL] Re: how to update text-list?
From: carl:cybercraft at: 18-Jan-2002 11:55
On 18-Jan-02, Patrick Philipot wrote:
> Hi, Rebollers
> How can one update a text-list? Surely a simple thing but ... I've
> tried this and it did not work: the change button changed nothing.
> Rebol []
> b-one: ["one" "two" "three"]
> b-two: ["red" "green" "blue"]
> win: layout [
> tl: text-list data b-one
> button "change" [tl/data: copy b-two show tl]
> ]
> view center-face win
Try this...
b-one: ["one" "two" "three"]
b-two: ["red" "green" "blue"]
win: layout [
tl: text-list data copy b-one
button "One" [append tl/data copy b-one show tl]
button "Two" [append tl/data copy b-two show tl]
button "Clear" [clear tl/data show tl]
]
view center-face win
Note I added 'copy to the 'text-list definition. If I hadn't the
'b-one block would've been the same block as 't1, and so changed as
well when the buttons were clicked.
> Patrick
>
______________________________________________________________________________
> ifrance.com, l'email gratuit le plus complet de l'Internet ! vos
> emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> http://www.ifrance.com/_reloc/email.emailif
--
Carl Read