Page 83 - KEC Khaitan C5 Flipbook
P. 83
Blocks
Button
Backpack
Built-in Blocks
Components Workspace
Blocks
Trash
Following are the main parts of the Block Editor:
Built-in Blocks: It contains all the predefined blocks in the application. They are
responsible for handling operations like Math, Text, Logic and Control.
Component Blocks: It contains relevant blocks for the components we have added in
the Design window.
Workspace: It arranges all the blocks for coding in the workspace.
Trash: It is used for deleting blocks that are not required.
Backpack: It stores the copy of all the blocks even when we exit App Inventor.
Making Click Event for Button
To making click event for button, follow the given
steps:
Step 1 Click on the Talking_Me button.
Step 2 Drag and drop When Talking_Me.Click
do block on the workspace.
This is an Event Handler block that will handle what
happens when the button on your app is clicked.
Program the TextToSpeech Action
To program the TextToSpeech, follow the given steps:
Step 1 Click on the TextToSpeech1 block.
Step 2 Click and hold the call TextToSpeech1.
Speak message block.
Step 3 Drag the block to the Workspace and
drop it onto the block labeled when
Talking_Me.Click.
This block will execute when the button on our
app is clicked and make our phone speak.
Introduction to Mobile Apps and MIT 81

