1 / 9

Programming with App Inventor

Programming with App Inventor. Computing Institute for K-12 Teachers Summer 2012 Workshop. User Input Session SA-1. User Input TextBox. Input from the user can accomplished by using a TextBox under the Basic Palette in the Designer .

gates
Download Presentation

Programming with App Inventor

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programming with App Inventor Computing Institute for K-12 Teachers Summer 2012 Workshop

  2. User InputSession SA-1

  3. User Input TextBox • Input from the user can accomplished by using a TextBox under the BasicPalette in the Designer. • A single character, text string, number, alphanumeric string maybe entered into the TextBox. • A TextBox can be set to accept numbers only and/or be multi-line input. • The TextBox has many properties shown in the Properties section of the Designer. These properties can be set at design-time (in the Designer) or a run-time in the BlocksEditor. • The information entered by the user is stored in the .Text attribute of the TextBox.

  4. User Input TextBox • To add a TextBox to your project select object from the Palette and drag it to the Viewer screen.

  5. User Input TextBox • A TextBox has two associated events: GotFocus and LostFocus. When the .GotFocus event occurs it means the TextBox has been selected and is ready to accept data. .LostFocus occurs when the Textbox looses focus and will not accept data. • A TextBox are often used in conjunction with a Label object. A label is used to display information to a user. As its name implies, a Label identifies what the user is to enter into the textbox. • The string display show by a Label object is stored in the .Text attribute (just as with the TextBox). The user cannot modify a label. • The string displayed by the label can be modified at both design-time via the Properties section of the Designer or at run-time with the Blocks Editor.

  6. User Input TextBox • Shown here is a Label and a TextBox.

  7. Project 1 – User Input • Create an app that asks the user to enter a piece of text, using a button display have one label put the text in uppercase, the second label takes a piece out of the text, and the third label adds another text onto the original text.

  8. Day 1 QuestionsApp Inventor Overview, Variables, Input • What types of data (information) can a variable store? • Name some of the basic objects that can be added to a project. • Where can your programs be saved using the App Inventor? • The App Inventor program consists of what three major components? • Name one object that can be used to obtain input from a user. • What type of input restriction can be enforced on a Text Box? • What types of data can a TextBox accept if not restricted?

  9. Day 1 Answer KeyApp Inventor Overview, Variables, Input • What types of data (information) can a variable store?Number, Text (including alphanumeric) , Boolean • Name some of the basic objects that can be added to a project.Button, Canvas, CheckBox, Clock, Image, Label, ListPicker, PasswordTextBox, TextBox, Sound, Ball, ImageSprite, Horizontal Arrangement, TableArrangement, VerticleArrangement • Where can your programs be saved using the App Inventor?Online (to the Google App Inventor Servers), Your local computer hard drive or other storage device • The App Inventor program consists of what three major components?App Inventor Designer, App Inventor Blocks Editor, Android Emulator (or Android Phone) • Name one object that can be used to obtain input from a user.TextBox, ListPicker, Notifier • What type of input restriction can be enforced on a Text Box?TextBox can be restricted to accept only numeric input • What types of data can a TextBox accept if not restricted?Numbers, Text, Boolean

More Related