Text prompter
A CwTextPrompter prompts the user for a single line of text, in response to a query. A text prompter from the OS/2 platform is illustrated below.
Text prompter
The message displayed by a text prompter is set using the messageString: method.
The initial contents of the text box for the user's answer can be set using the answerString: method.
The prompt method returns nil if the prompter was cancelled, or the contents of the text box if the user pressed the return key or the OK button.
The text prompter shown above is created by the following code.
| reply |
reply :=
CwTextPrompter new
title: 'Text Prompter Example';
messageString: 'What is your name?';
answerString: 'Enter your name here';
Transcript cr; show: 'The reply was: ', reply printString.
Last modified date: 12/21/2017