2 # ---------------------------------------------------------
4 # Filename: Textentry3.ui
6 # Purpose: test cases for ui test
10 # Maintainer: jd@suse.de
12 # Remarks: Always the user interaction is removed:
13 # any answer = UserInput();
14 # Furthermore the tested action is set into a loop
16 # ---------------------------------------------------------
18 // Example 3 for Textentry
20 // Syntax: Textentry( Id id, UTF8 label ,UTF8 defaultText [, int maxLength, [int fieldSize]] )
24 any ok = `HBox(`Stretch(), `Pushbutton(`Id("ok"), "OK"), `Stretch());
25 any dialog = Dialog( `VBox(
26 `Textentry(`Id("text"), "&Please enter your name:", "Helmut"),
34 any dialog = Dialog( `VBox(
35 `Textentry(`Id("text"), "&Please enter your name:", "Helmut"),
39 ChangeWidget( dialog, `Id("text"), "Hans-Diether" );
41 CurrentMap = QueryDialog( dialog );
44 if( ( is( CurrentMap, map ) == false ) ||
45 ( size( CurrentMap ) != 1 ) ||
46 ( select( CurrentMap, 0 ) != [ `Id("text"), "Hans-Diether" ] ) ) return false;
48 dialog = Dialog( `VBox(
49 `Textentry(`Id("text"), "&Please enter your name:", "Helmut"),
53 ChangeWidget( dialog, `Id("text"), "Helmut" );
55 CurrentMap = QueryDialog( dialog );
58 if( ( is( CurrentMap, map ) == false ) ||
59 ( size( CurrentMap ) != 1 ) ||
60 ( select( CurrentMap, 0 ) != [ `Id("text"), "Helmut" ] ) ) return false;