Information and Contacts

Latest News

This section of the V4T Project portal provides administrative information for the project contractual partners and for the European Commission and it is password protected.



Table of Contents
3.2 Building apps with App Inventor
3.2.3 Programming with blocks

The Blocks Editor manages code blocks and programs the behavior of your application. Blocks are puzzle-piece shapes that are used to create a program.

Applications created by App Inventor are event-driven. Instructions are not executed in a predefined order but they respond to events. An event is an action such as clicking a button or tapping on the screen. Shaking the phone is also an event. The programmer describes how the phone should respond to events by using event handler blocks.

 

Built-in blocks

Built-in blocks (Control, Logic, Math, Text, Lists, Colors, Variables and Procedures blocks) are available regardless of the components of the project.

Control blocks are used for making decisions.

Logic blocks.

Math blocks are the blocks that perform math functions.

Text are the blocks that perform string handling.

With the Lists blocks you can manage the items of a list.

With the Variable blocks you can manage global and local variables. There are five types of variable blocks (initialize global name to, get, set, initialize local name to in-do and initialize local name to in-return).

 

Component-Specific blocks

Many of the components of your app may have method call blocks in their Component-Specific drawer. A method call block is a predefined set of instructions that allows you to use the functionality of the component.

 

Procedure blocks

With the Procedure blocks you can manage procedures. A procedure is a sequence of instructions that is grouped under a name and performs a specific task. Instead of having complex programs you can create procedures and invoke them whenever you want to use them.

Procedure and many other blocks, including 'if-else' and 'make list', provide a blue mutator button. If you click it, you can transform the block, e.g, adding arguments to procedures or 'else' branches to an if.


Online Resource

This page explains how basic blocks work.

An overview of an App's Architecture

This tutorial shows you how to create procedures in App Inventor

This tutorial shows you how to call procedures in App Inventor

A quick overview about using mutators in App Inventor




This project has been funded with support from the European Commission. This web site reflects the views only of the author, and the Commission cannot be held responsible for any use which may be made of the information contained therein.

The V4T - Videogames 4 Teachers project © 2018