I want to set a variable in a Rebol 3 button handler (GUI) and use the value after the window is closed. How do I get the value outside of the view block? Here is an example code:
view [
v_username: field
button "Submit" on-action [
username: get-face v_username
close-window face
]
]
probe username
The result is "" regardless of the content of v_username.
Does it have to be 'declared' as a global variable? Should I get this value from a returned value of the view?