Procedures ========== .. function:: modalDialog([win,] [text [,args...]]) This procedure opens a dialog window with text **text** in front of other Psiexp windows. If present, **args** contain the text of the response buttons, otherwise there will be a single button labelled "ok". Sets **modalDialog.answer** with the button's number. Buttons are numbered in descending order so that the rightmost button's number is 0. Typing or is equivalent to clicking the rightmost button. For example:: modalDialog("well?", "clicked 3", "two", "chose 1", "default is 0"); if (modalDialog.answer == 1) { ... } .. function:: alert([text [,remark [,args...]]) alert(text, remark, argList) Like modalDialog, but uses macOS alert functionality. **remark** is an additional message, such as a more detailed description of the error. Differences between **alert** and **modalDialog**: While **alert** is running, you cannot Quit Psiexp; to kill it you must use Activity Monitor. It is builtin, so can be called from inside a function. No events are handled, they are saved and will be available to the next wait() loop. **modalDialog** is a procedure, and handles all events (ignoring those unrelated to the alert). Typing in **modalDialog** is equivalent to clicking the default; **alert** ignores . If you move or resize the **modalDialog** window, the settings will be retained the next time you call it. The **alert** panel always appears in the same place and cannot be resized. .. function:: doAlert0(otherPane, prompt, text1, text2, text3, text4) Legacy alert. Deprecated. .. function:: notImplementedAlert(container, [text [,args...]) notImplementedAlert([text [,args...]) This procedure is not implemented and may never be. This procedure replaces current *container* display with the message *text* and one or more response buttons. If *container* is not supplied, it uses current window if there is one, otherwise it uses a temporary window. It waits until one of those buttons is pressed, then stores that button's number in *alert.answer* and returns. If present, *args* are the labels of the buttons. If no *args* are supplied, one button with label "ok" is displayed. .. function:: atomInspectorProcedure | oh, yeah .. function:: getSubjectName(prompter, default) .. function:: getSubjectNumber(prompt, &answer)