Hi Daniel,

you cant directly change the block that the text list references.
ie You cant redefine the variable.

You have to use insert/remove/clear etc.

Below is some revised code .... there are still problems with the scroll bar though.

Cheers Phil


REBOL [Title: "File Selector and Directory Navigator"]

curr-dir: change-dir %.
lv-data: sort read curr-dir

view layout 
[
    vh2 "Current Dir"
    curr: vtext to-string curr-dir 200x24
    vh2 "File List:"
    fileList: text-list data lv-data
    [
        either dir? rejoin [curr-dir value]
        [
            curr-dir: rejoin [curr-dir value]
            curr/text: to-string curr-dir
            clear lv-data
            foreach lv-file sort read curr-dir
                [insert lv-data lv-file]
            show curr
            show fileList
        ]
        [fileLocal/text: value show fileLocal]
    ]
    
    
    fileLocal: field
    button "Great!" [
        print join "fileList/data: " fileList/data
        show fileList
    ]
]





-- original message -- 

Why can't I change the value of a text-list with 

fileList/data: ...
or
fileList/text: ...

in this code? Is there any other way?


REBOL [Title: "File Selector and Directory Navigator"]

view layout [
        vh2 "File List:"
        fileList: text-list data sort read %. [
                either dir? value [
                        fileList/data: read value show fileList
                ] [
                        fileLocal/text: value show fileLocal
                ]
        ]
        
        
        fileLocal: field
        button "Great!" [
                print join "fileList/data: " fileList/data
                show fileList
        ]
]


Daniel

-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to