[REBOL] Re: How to refresh a text-list
From: carl:cybercraft at: 26-Feb-2002 20:42
On 26-Feb-02, [atruter--hih--com--au] wrote:
> Doubtless this has been asked before (no luck after a quick EScribe
> search), but how does one refresh a text-list. I thought my code
> below show work. Is this a bug? feature? poor coding ;)
> rebol 
> view layout [
> a: area form read %. 'wrap
> button "Area" [a/text: read %.. show a]
> b: text-list data read %.
> button "List" [b/data: read %.. show b]
You need to clear the data block and then append to it. That way
you're still working with the same block, whereas you're creating a
new block with your above method which is why it won't update. ie...
view layout [
a: area form read %. 'wrap
button "Area" [a/text: read %.. show a]
b: text-list data read %.
button "List" [clear b/data append b/data read %.. show b]
You could use the same method with the area text as well - it's just
that for some reason it's not required. (Ask others:)