13.6: Interactors

Pharo by Example 5.0 · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    From LibreTexts, under CC BY-SA 3.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    13.6: Interactors

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

    UIManager default request: 'What''s your name?' initialAnswer: 'no name'
    

    To display a popup menu, use one of the various chooseFrom: methods (Figure \(\PageIndex{2}\)):

    UIManager default
        chooseFrom: #('circle' 'oval' 'square' 'rectangle' 'triangle')
        lines: #(2 4) message: 'Choose a shape'
    

    Browse the UIManager class and try out some of the interaction methods offered.

    An input dialog.
    Figure \(\PageIndex{1}\): An input dialog.
    Pop-up menu.
    Figure \(\PageIndex{2}\): Pop-up menu.

    This page titled 13.6: Interactors was last modified on Sat, 19 Dec 2020 08:13:40 GMT and is shared under a CC BY-SA 3.0 license and was authored, remixed, and/or curated by via source content that was edited to the style and standards of the LibreTexts platform.