Original Author Paul Laughton, 2011
Page 102
De Re BASIC!
If the optional <text_sexp> is present then that text is loaded into the text input window for editing. If
<text_sexp> is not present then the text.input text area will be empty. If <title_sexp> is needed but
text.input text area is to be initially empty, use two commas to indicate the <sexp> specifies the title and
not the initial text.
When done editing, tap the Finish button. The edited text is returned in <svar>.
If you tap the BACK key then all text editing is discarded. <svar> returns the original <sexp> text.
The following example grabs the Sample Program file, f01_commands.bas, to string s$. It then sends s$
to text.input for editing. The result of the edit is returned in string r$. r$ is then printed to console.
GRABFILE s$, "../source/ Sample_Programs/f01_commands.bas"
TEXT.INPUT r$,s$
PRINT r$
END
TGet <result_svar>, <prompt_sexp> {, <title_sexp>}
Simulates a terminal. The current contents of the Output Console is displayed in a new window. The last
line displayed starts with the prompt string followed by the cursor. The user types in the input and taps
enter. The characters that the user typed in is returned in <result_svar>. The prompt and response are
displayed on the Output Console.
You may set the title of the text input window with the optional <title_sexp> parameter.
Kb.hide
Hides the soft keyboard.
If the keyboard is showing, and you have an OnKbChange: interrupt label, BASIC! will jump to your
interrupt label when the keyboard closes.
The soft keyboard is always hidden when your program starts running, regardless of whether it is
showing in the Editor.
Note: BASIC! automatically hides the soft keyboard when you change screens. For example, if the
keyboard is showing over the Output Console, and you execute Gr.open to start Graphics Mode, the
keyboard is hidden. The keyboard will not be showing when you exit Graphics Mode and return to the
Console. Similarly, if you show the keyboard over your Graphics screen and you execute Gr.close to
return to the Console, the keyboard is hidden.
If you have an OnKbChange: interrupt label, automatically hiding the keyboard does not trigger a jump
to the interrupt label.
Kb.show
Shows the soft keyboard.