19
Output in AppLab Sheet 1.5

Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Output in AppLabSheet 1.5

Page 2: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Output Code Makes the

Output Device Do Something

Page 3: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

We Change the Screen Output

Images Change

Text Changes

Page 4: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

We Can Also Play Sounds

Meow!!!

Page 5: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

The Output Blocks

Changes the text.

Changes the image.

Plays a sound.

Changes the screen.

Page 6: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How many

widgets?

Page 7: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How many

widgets?

7

Page 8: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How many

widgets?

7

How many types of widgets?

Page 9: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How many

widgets?

7

How many types of widgets?

3

Page 10: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How do you know how

many onEventsyou need?

Page 11: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

How do you know how

many onEventsyou need?

Count the buttons!

You need one onEventfor each button.

Page 12: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

What are the ids of

the buttons?

Page 13: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

What are the ids of

the buttons?

Text id?

Page 14: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

What are the ids of

the buttons?

Text id?

Picture id?

Page 15: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

What are the ids of

the buttons?

Text id?

Picture id?

Page 16: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Which widgets need

ids?

Page 17: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Which widgets need

ids?

All of the buttons

Any images or code that change.

Why?

Page 18: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Which widgets need

ids?

All of the buttons

Any images or code that change.

Why?

It makes the code easier to

read.

Page 19: Output in AppLabgorskicompsci.ca/ICS2O/Unit1/ppt5_OutputinAppLab.pdfThe Output Blocks Changes the text. Changes the image. Plays a sound. Changes the screen

Which widgets need

ids?

All of the buttons

Any images or code that change.

Why?

It makes the code easier to

read.