That should be unview/ONLY :

> view layout[
>   text "Titel" FTitel: field
>   button "OK" [either empty? FTitel/text
>               [
>               view/new newlay: layout
>                [
>                 text "Enter Title"
>                 button "OK" [unview newlay focus Ftitel]  ; <---- bad

                        button "OK" [unview/only newlay focus Ftitel] ; <--- 
good

>                ]
>               ]
>               [unview/all]
>  ]]

Unview by itself will close just the last opened window,
which only works until you open a second window.

But, to be honest, this approach to field validation
seems to be not a good one, if I understand what you're trying
to do. Why open a second window asking for the same information?
That's just moving the problem to a second window.

How about something like this ?

view center-face layout [
        text "Titel" FTitel: field
        button "OK" [
                either empty? FTitel/text [
                        FTitel/edge: make FTitel/edge [color: red]
                        focus FTitel ; (also does a SHOW)
                ][
                        unview
                ]
        ]
]

Anton.
-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to