Creating a List with Some Stuff Already In It

Now we’re going to create a list in a different way. We’re still going to initialize a global variable, but we’re going to use the make a list block, which takes inputs. You can change how many items the make a list block will accept (how many input sockets it has) by clicking the gear and dragging items into and out of the mutator that pops up (see Figure 6.7).


Figure 6.7 Drag items into the mutator until you have the number of list items you need.

Add one more item to the list block so that it has three inputs. Then we’ll give it three pieces of data, which will be in the list right away when ...

Get Learning MIT App Inventor: A Hands-On Guide to Building Your Own Android Apps now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.