Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Input/UI Dialogs

When your Final code runs inside final or final-gui, you can raise modal dialogs that pause the script until the user chooses Ok or Cancel.

These APIs live on the class-only type Dialog. The mechanisms used to build and show these dialogs are the same for both final and final-gui. (You do not need to know anything about Fyne and final-gui.)

There are three kinds:

KindWhen to useEntry
PromptYes/no confirmation with a short messageSimple Prompt Dialogs
AskCollect a handful of string responses, using a simple APISimple Ask Dialog
FieldCollect a handful of typed values (name, flag, number, …) using a more elaborated API than askField Dialogs

All three are blocking: the call does not return until the dialog closes. Esc (and Break / Ctrl-B) means Cancel. Only one dialog may be open at a time.

You already know the pieces these APIs lean on:

The next two pages cover the exact stack effects, parameters, and short worked examples.