| Did you know ... | Search Documentation: |
| frame<-confirm |
->return
is invoked. Used to implement modal prompts.
When grab is @on
the frame grabs the pointer. If the frame is freed while the confirmer
is blocking, the call fails.
Typical use:
ask_name(Name) :-
new(D, dialog('Name Prompter')),
send(D, append, new(N, text_item(name, ''))),
send(D, append,
button(ok, message(D, return, N?selection))),
send(D, append,
button(cancel, message(D, return, @nil))),
send(D, default_button, ok),
get(D, confirm, Answer),
send(D, destroy),
Answer \== @nil,
Name = Answer.
->return -return_value <-confirm_centered <-confirm