PWCT 1.9 Art Documentation ( http://doublesvsoop.sourceforge.net ) 2006-2019, Mahmoud Fayed ( msfclipper@users.sourceforge.net ) _____________________________________________________________________________________ Table of contents 1 - Introduction 2 - Implementation steps 3 - Final Steps Tree 4 - Application during the runtime 1 - Introduction In this lesson we are going to learn how to call procedures based on a key pressed by the user. 2 - Implementation Steps Fig. (1) Goal Desginer - Steps Tree Select the step (The First Step) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (Define New Window) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Define New Window) Note : Stop typing when you see the required component is selected Fig. (2) Component Browser – Select the component (Define New Window) After selecting the component click Ok or press ENTER Fig. (3) Interaction page - Set the properties and enter the required data as in the image above Fig. (4) Form Designer Fig. (5) Goal Desginer - Steps Tree Select the step (Window Events) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (Window Events) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Window Events) Note : Stop typing when you see the required component is selected Fig. (6) Component Browser – Select the component (Window Events) After selecting the component click Ok or press ENTER Fig. (7) Interaction page - Set the properties and enter the required data as in the image above Fig. (8) Form Designer Fig. (9) Goal Desginer - Steps Tree Select the step (Window Controls) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Controls) 3 - Select the component (Button) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Button) Note : Stop typing when you see the required component is selected Fig. (10) Component Browser – Select the component (Button) After selecting the component click Ok or press ENTER Fig. (11) Interaction page - Set the properties and enter the required data as in the image above Fig. (12) Form Designer Fig. (13) Goal Desginer - Steps Tree Select the step (Procedures) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Structure Programming) 3 - Select the component (Define Procedure) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Define Procedure) Note : Stop typing when you see the required component is selected Fig. (14) Component Browser – Select the component (Define Procedure) After selecting the component click Ok or press ENTER Fig. (15) Interaction page - Set the properties and enter the required data as in the image above Fig. (16) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (On Key) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (On Key) Note : Stop typing when you see the required component is selected Fig. (17) Component Browser – Select the component (On Key) After selecting the component click Ok or press ENTER Fig. (18) Interaction page - Set the properties and enter the required data as in the image above Fig. (19) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (On Key) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (On Key) Note : Stop typing when you see the required component is selected Fig. (20) Component Browser – Select the component (On Key) After selecting the component click Ok or press ENTER Fig. (21) Interaction page - Set the properties and enter the required data as in the image above Fig. (22) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (On Key) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (On Key) Note : Stop typing when you see the required component is selected Fig. (23) Component Browser – Select the component (On Key) After selecting the component click Ok or press ENTER Fig. (24) Interaction page - Set the properties and enter the required data as in the image above Fig. (25) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Windows) 3 - Select the component (On Key) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (On Key) Note : Stop typing when you see the required component is selected Fig. (26) Component Browser – Select the component (On Key) After selecting the component click Ok or press ENTER Fig. (27) Interaction page - Set the properties and enter the required data as in the image above Fig. (28) Goal Desginer - Steps Tree Select the step (Procedures) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Structure Programming) 3 - Select the component (Define Procedure) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Define Procedure) Note : Stop typing when you see the required component is selected Fig. (29) Component Browser – Select the component (Define Procedure) After selecting the component click Ok or press ENTER Fig. (30) Interaction page - Set the properties and enter the required data as in the image above Fig. (31) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Control Structure) 3 - Select the component (IF Statement) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (IF Statement) Note : Stop typing when you see the required component is selected Fig. (32) Component Browser – Select the component (IF Statement) After selecting the component click Ok or press ENTER Fig. (33) Interaction page - Set the properties and enter the required data as in the image above Fig. (34) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Classes) 3 - Select the component (Button Class) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Button Class) Note : Stop typing when you see the required component is selected Fig. (35) Component Browser – Select the component (Button Class) After selecting the component click Ok or press ENTER Fig. (36) Interaction page - Set the properties and enter the required data as in the image above Fig. (37) Interaction page - Set the properties and enter the required data as in the image above Fig. (38) Interaction page - Set the properties and enter the required data as in the image above Fig. (39) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Control Structure) 3 - Select the component (IF Statement) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (IF Statement) Note : Stop typing when you see the required component is selected Fig. (40) Component Browser – Select the component (IF Statement) After selecting the component click Ok or press ENTER Fig. (41) Interaction page - Set the properties and enter the required data as in the image above Fig. (42) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Classes) 3 - Select the component (Button Class) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Button Class) Note : Stop typing when you see the required component is selected Fig. (43) Component Browser – Select the component (Button Class) After selecting the component click Ok or press ENTER Fig. (44) Interaction page - Set the properties and enter the required data as in the image above Fig. (45) Interaction page - Set the properties and enter the required data as in the image above Fig. (46) Interaction page - Set the properties and enter the required data as in the image above Fig. (47) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Control Structure) 3 - Select the component (IF Statement) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (IF Statement) Note : Stop typing when you see the required component is selected Fig. (48) Component Browser – Select the component (IF Statement) After selecting the component click Ok or press ENTER Fig. (49) Interaction page - Set the properties and enter the required data as in the image above Fig. (50) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Classes) 3 - Select the component (Button Class) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Button Class) Note : Stop typing when you see the required component is selected Fig. (51) Component Browser – Select the component (Button Class) After selecting the component click Ok or press ENTER Fig. (52) Interaction page - Set the properties and enter the required data as in the image above Fig. (53) Interaction page - Set the properties and enter the required data as in the image above Fig. (54) Interaction page - Set the properties and enter the required data as in the image above Fig. (55) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Control Structure) 3 - Select the component (IF Statement) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (IF Statement) Note : Stop typing when you see the required component is selected Fig. (56) Component Browser – Select the component (IF Statement) After selecting the component click Ok or press ENTER Fig. (57) Interaction page - Set the properties and enter the required data as in the image above Fig. (58) Goal Desginer - Steps Tree Select the step (Start Here) We will start now new interaction process to generate new steps to our steps tree. The slow way (Using Mouse): 1 - Click Interact to open the components browser 2 - Select the domain (Classes) 3 - Select the component (Button Class) The fast way (Using Keyboard shortcuts): 1 - Get the component using its name by typing (Button Class) Note : Stop typing when you see the required component is selected Fig. (59) Component Browser – Select the component (Button Class) After selecting the component click Ok or press ENTER Fig. (60) Interaction page - Set the properties and enter the required data as in the image above Fig. (61) Interaction page - Set the properties and enter the required data as in the image above Fig. (62) Interaction page - Set the properties and enter the required data as in the image above Fig. (63) Goal Desginer - Final Steps Tree 3 - Final Steps Tree The First Step Define New Window ( win1 ) , Title : "On Key Sample" Window Events Event: ON INIT : Action DefineKeys Window Properties Window Controls Define New Button ( btn1 ) , Caption : "Use keyboard arrows to move me" Button Events Button Properties End Of Window Activate window Procedures Define Procedure DefineKeys Start Here On Key VK_RIGHT Mode 0 Call Procedure/Function mymove(1) On Key VK_LEFT Mode 0 Call Procedure/Function mymove(2) On Key VK_UP Mode 0 Call Procedure/Function mymove(3) On Key VK_DOWN Mode 0 Call Procedure/Function mymove(4) End of Procedure Define Procedure mymove( p1 ) Start Here IF ( p1 = 1 ) Start Here win1.btn1.Col := win1.btn1.col + 10 ELSE Start Here IF ( p1 = 2 ) Start Here win1.btn1.Col := win1.btn1.col - 10 ELSE Start Here IF ( p1 = 3 ) Start Here win1.btn1.Row := win1.btn1.row - 10 ELSE Start Here IF ( p1 = 4 ) Start Here win1.btn1.Row := win1.btn1.row + 10 END OF IF STATEMENT END OF IF STATEMENT END OF IF STATEMENT END OF IF STATEMENT End of Procedure 4 - Application during the runtime Fig. (64) Application during the runtime Fig. (65) Application during the runtime
|