Page 137 - CodePilot V5.0 C5
P. 137
Step 4 Add a TextBox for input by dragging it from the Palette to the Viewer,
then set its Hint to Enter a number.
Step 5 Drag a Button from the Palette to the Viewer, then set its Text to
Generate.
Step 6 Drag a ListView from the Palette to the Viewer. The ListView will display
the multiplication table after the user enters a number and clicks the
Generate button.
Step 7 Click on the Blocks in the top-right corner to switch to the Blocks Editor
and start coding the app’s functionality.
Step 8 Click on the Variables from the Blocks menu. The list of coding blocks
appears.
Step 9 Create the Global Variable List, drag the initialize global name to block
the Viewer, then click on the name section and rename it to List.
Step 10 Add an Empty List from the Lists category, drag the create empty list
block and connect it to the List variable.
Step 11 Drag the initialize global name to block into the Viewer, then click on
the name section and rename it to Answer.
Step 12 From the Math category, drag the number block (0) and connect it to
the Answer variable.
Step 13 Click on the Button1 from the list of components. The list of coding blocks
appears.
Step 14 Drag the when Button1. Click block into the Viewer.
Step 15 Inside the Button1 block, drag set global List to and connect create
empty list from the Lists category.
Creating Apps with MIT App Inventor 135

