Close views in reverse order

Started by OneArb on 28-Mar-2017/15:41:58-7:00
I am attempting the following code, however unview out1 closes out2 rather than out1 as expected. out1: layout [text 'out1' button 'Close 2' [unview out2]] out2: layout [button 'Close 1' [unview out1]] view/new out1 view/new out2 do-events
UNVIEW doesn't take an argument. To close a specific face, you need to use UNVIEW/ONLY.
I got that example from http://www.rebol.com/docs/words/wunview.html which stipulates a face can be an argument.
The explanations at http://www.rebol.com/docs/words/wunview.html are correct: "To close a specific window, use the /only refinement and specify the window's face" The explanation for the code you referenced: "The next example will open two windows, then use UNVIEW/only to close each one separately." Yes, there is a clear error in the example code.
I imagine rebol.com creator has been asked before. +1 to power-up community to curate rebol.com

Reply