[REBOL] Pane Refresh Problem
From: coussement::c::itc::mil::be at: 2-May-2001 11:29
For experimenting with /View, I've written another "Game of Life".
The algorithm works OK with an ASCII output, but I cannot get the result in
/view, because I don't know how to trigger a refresh of the pane.
Here's the code I use for the visual part - max-x and max-y are global words
setting the size of the life map.
show-visual: func [
/local x y main society
main: layout [
vh2 "Game of Life"
button "QUIT" [unview halt]
box 2x140 yellow
panels: box 300x300
backdrop black across space 1x1
style alive box red 10x10
style dead box black 10x10
make-live ;--- create the life map
;--- dynamically append boxes to pane
for x 1 max-x 1 [
for y 1 max-y 1 [
either (alive? x y)[
append society 'alive
append society 'dead
append society 'return
panels/pane: layout society
It works if I close the generated windowat each generation.
It's for sure not difficult, but I cannot find anything in the Doc :-(
Any idea ?