The need for input values is shown by sockets on the right edge of the command. For example, call Sound1.Vibrate needs to know the number of milliseconds to vibrate, set Label1.BackgroundColor needs to know the new background color of the label, and set Label1.text needs to know the new text string for the label. Some commands require one or more input values (also known as parameters or arguments) to completely specify their action. Here are some sample commands, some of which you may recognize from building HelloPurr: Most command blocks are purple or blue in color. A command is a block that specifies an action to be performed on the phone (e.g., playing sounds). When an event handler fires, it executes a sequence of commands in its body. When an event occurs on a phone, the corresponding event handler is said to fire, which means it is executed. Here are some examples of event handlers. Most event handlers are green in color and are stored at the top part of each drawer. E.g., when Button1.Click and when AccelerometerSensor1.Shaking in HelloPurr. This is specified by event handler blocks, which used the word when. Event HandlersĪpp Inventor programs describe how the phone should respond to certain events: a button has been pressed, the phone is being shaked, the user is dragging her finger over a canvas, etc. This page explains how basic blocks work.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |