cs 104 october 26, 2011 app inventor. agenda discuss guest speakers discuss quiz finish paint pot...
TRANSCRIPT
CS 104October 26, 2011
App Inventor
Agenda Discuss guest speakers Discuss quiz Finish Paint Pot Discuss concepts from Chapters 2 & 3 Mole Mash (if time permits)
Terminology Components Behaviors Sensor Arrangement Canvas Event Event Handler Variable Image Sprite Procedure
Components
Used in the design portion
ButtonUser clicks the button
and some action occurs.
CanvasCan display an image or appear blank. The user
can interact with the canvas while running the
app.
CheckboxThe user makes a
selection from a list of options.
ImageCan be for added appeal, but it is a static element.
LabelDescriptive text for the
user to read.
TextboxBox for in which the user
enters information.
Arrangements
Purpose Helps organize components Makes the screen more readable
Horizontal Arrangement
Vertical Arrangement
Behaviors
Behaviors are the actions of the components Some components in the design may require
some action, it is up to the programmer to create these actions
Events and Event Handlers
Some components such as a button require a trigger, an event, to occur in order for the behavior to begin
A button is clicked A canvas is touched Once the event takes place, an event handler
is required (the event must have code associated with it) in order for some action to occur
Sensors Sensors read in information and pass it along AccelerometerSensor
Shaking Measure acceleration
LocationSensor Longitude Latitude Altitude (device dependent) Address
OrientationSensor (device shouldn’t be moving) Roll Pitch Azimuth
Variable
A place in memory that holds various information
Procedure
A block of code we use to prevent rewriting the same code repeatedly
Two types Procedure that returns a value (like a reporter
block in BYOB) Procedure that does not return a value (like a
command block in BYOB)
What’s Next
Team Project #2