Skip to main content
Engineering LibreTexts

11.6: Interactors

  • Page ID
    36395
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    To prompt the user for input, the FillInTheBlank class provides a few ready-to-use dialog boxes. For instance, the request:initialAnswer: method returns the string entered by the user (Figure \(\PageIndex{1}\)).

    Dialog displayed by FillInTheBlank request.
    Figure \(\PageIndex{1}\): Dialog displayed by FillInTheBlank request: 'What''s your name?' initialAnswer: 'no name'.
    Pop-up menu.
    Figure \(\PageIndex{2}\): Pop-up menu displayed by PopUpMenu»startUpWithCaption:.

    To display a pop-up menu, use the PopupMenu class:

    menu := PopUpMenu
        labelArray: #('circle' 'oval' 'square' 'rectangle' 'triangle')
        lines: #(2 4).
    menu startUpWithCaption: 'Choose a shape'
    

    This page titled 11.6: Interactors is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by Andrew P. Black, Stéphane Ducasse, Oscar Nierstrasz, Damien Pollet via source content that was edited to the style and standards of the LibreTexts platform; a detailed edit history is available upon request.