Refresh Image in Rebol

I've been working on this for a while. Went through the REBOL docs and the answers here, but I'm stumped. Can someone please tell me how to get the REBOL GUI image to update to another image? Here is the code I got after two days of hacking. Any help would be appreciated by him.

REBOL [
    Title: "Yvonne View"
]

yvonne: func[] [
    parts: probe parse read http://pics.mytrapster.com/yvonne.php {="}
    load to-string parts/6    
]

img1: to-image (load-image yvonne)
img2: to-image (load-image yvonne)

v1: layout [
    size 500x500
    b: image img1
    btn "Refresh" [ b: img2 ]
    btn "Quit" [quit]
]

view v1

      

Loading URL. The quit button works. The variable "b" is simply not cleared or updated.

Thank.

+3


source to share


1 answer


How can you update the image use set-face

Change the line of the refresh button to:



 btn "Refresh" [set-face b img2]

      

Alternatively, if you manually change the face panel, you can use show

(i.e. show b

)

+3


source







All Articles