← Teacher guide

A chores checklist

Students make a checklist of jobs as tick boxes (Toggles with the Tick box look, which switch themselves), then build a 🌙 Dark / ☀️ Light button by hand with a true/false variable Dark. They first build a button that goes dark and stays dark, then try two separate click events (which cancel each other on one click), then fix it with one click event, a sub-event and an Else.

App Builder apps · Apps that respond · about 60 minutes · Open the student lesson

Classroom resources

Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.

Students will be able to

Timing

Try 5 min · Build (five short steps) 32 min · Check 8 min · Make it yours 15 min

Before class

Needs App Builder 1.11 or later (the tick box look is 1.10, colours while the app runs are 1.11). The lesson's playground already has it.

The jobs are Toggles. Look: Tick box changes only how they look: BedJob.on is true or false either way, and "is switched" and "is on" work the same. A Toggle can't be given a colour, so the jobs sit on a light card (a Box) that stays light in dark mode.

Sub-events and Else are added from an event's ⋯ menu (Add a sub-event, Add an Else below). Select the event first by clicking it.

Dark is a true/false variable: it starts at false. Conditions compare it with = (Variable Dark = false). In a formula, App Builder's if() needs a comparison too: if(Dark = true, "On", "Off"), not if(Dark, …).

The emoji ☀️ and 🌙 paste fine on most laptops; if one shows an empty square, use "Light" and "Dark" instead, in the actions and in the button's text.

The one idea: on one click, every event whose conditions are true runs, top to bottom. One trigger with two branches (a sub-event and an Else) means exactly one runs.

Running the lesson

  1. Before Build 3 (whole class, on the deck): two events, one click: what does the screen show? Most say dark. Leave it open; Build 3 is the reveal.
  2. Build 3: ask a pair to explain what happened in order: first event, then second event, and what Dark was each time.
  3. Check: draw the event on the board with the two branches as arrows. Only one arrow is taken per click.
  4. After Build 5: point back to the tick boxes. Each one is the same switch, built in: it remembers on or off, and one click flips it.
  5. Make it yours: this is the review step. Ask which branch means 'just finished a job'.

In class

On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.

The hard part (on purpose)

Building the version that doesn't work on purpose (Build 3) feels like wasted effort, and Build 4 asks students to delete it and type the actions again. That's the point: they need to see two flat events cancel before the sub-event makes sense. Pairs can share the typing.

When students get stuck

What you will seeA question to askThe fix
The screen doesn't go dark at all.What does the condition check, and what does Dark start at?Dark starts at false, so the dark branch checks Variable Dark = false. Type false with no quote marks.
The colour action is missing for a job.What kind of object is the job?Toggles can't be coloured; that's why the jobs sit on a light card. Set colours only on Texts, Boxes and Buttons.
There's no Add a sub-event in the menu.Which level is the app on?Sub-events need level 2 or more. In a lesson the level is set for you; if the menu lacks it, tell your teacher.
Done goes up when unticking.Which branch has the add 1?Add 1 belongs in the BedJob is on branch (it's just been ticked); subtract 1 in the Else.

Answers to the checks

  1. Trace a click: With the sub-event and Else, the screen is dark, so Dark is true. You click ModeButton once. What happens?
    The Else runs, so it goes light
    The click triggers the event once. Its sub-event checks Dark = false, which is false, so the Else runs instead and sets everything back to light. Exactly one branch runs per click.
  2. Find Nib's mistake: Nib's dark mode button doesn't seem to do anything. Click the line where Nib first goes wrong.
    line 3
    Line 3: a second separate click event also runs on the same click, straight after the first, and undoes it. The fix is one click event with a sub-event and an Else.

Solutions

One possible solution for each task. Other correct programs are fine.

Make it yours: count what's done › Count what's done

{"version":1,"name":"Chores checklist","features":{"level":2},"variables":[{"name":"Dark","value":false},{"name":"Done","value":0}],"screens":[{"id":"main","name":"Chores","objects":[{"name":"Title","kind":"text","instanceVars":[],"instances":[{"id":"title","x":229,"y":40,"w":342,"h":36,"text":"My jobs today","visible":true,"vars":{}}]},{"name":"Card","kind":"shape","instanceVars":[],"instances":[{"id":"card","x":213,"y":96,"w":374,"h":204,"text":"","visible":true,"vars":{},"color":"#f1f4f9"}]},{"name":"BedJob","kind":"toggle","instanceVars":[],"instances":[{"id":"bedjob","x":229,"y":108,"w":326,"h":40,"text":"Make my bed","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"FeedJob","kind":"toggle","instanceVars":[],"instances":[{"id":"feedjob","x":229,"y":160,"w":326,"h":40,"text":"Feed the dog","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"HomeworkJob","kind":"toggle","instanceVars":[],"instances":[{"id":"homeworkjob","x":229,"y":212,"w":326,"h":40,"text":"Do my homework","visible":true,"vars":{},"on":false,"look":"tick"}]},{"name":"DoneText","kind":"text","instanceVars":[],"instances":[{"id":"donetext","x":229,"y":256,"w":326,"h":32,"text":"Done: 0 of 3","visible":true,"vars":{}}]},{"name":"ModeButton","kind":"button","instanceVars":[],"instances":[{"id":"modebutton","x":229,"y":312,"w":160,"h":46,"text":"🌙 Dark","visible":true,"vars":{}}]}],"events":[{"id":"m1","else":false,"conds":[{"type":"onClicked","target":"ModeButton"}],"actions":[],"children":[{"id":"m1a","else":false,"conds":[{"type":"compareVar","var":"Dark","op":"=","value":"false"}],"actions":[{"type":"setVar","var":"Dark","value":"true"},{"type":"setBackground","value":"\"#1c2333\""},{"type":"setColour","target":"Title","value":"\"white\""},{"type":"setText","target":"ModeButton","value":"\"☀️ Light\""}],"children":[]},{"id":"m1e","else":true,"conds":[],"actions":[{"type":"setVar","var":"Dark","value":"false"},{"type":"setBackground","value":"\"white\""},{"type":"setColour","target":"Title","value":"\"black\""},{"type":"setText","target":"ModeButton","value":"\"🌙 Dark\""}],"children":[]}]},{"id":"BedJob","else":false,"conds":[{"type":"onToggled","target":"BedJob"}],"actions":[],"children":[{"id":"BedJoba","else":false,"conds":[{"type":"isOn","target":"BedJob","state":"on"}],"actions":[{"type":"addTo","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]},{"id":"BedJobe","else":true,"conds":[],"actions":[{"type":"subtractFrom","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]}]},{"id":"FeedJob","else":false,"conds":[{"type":"onToggled","target":"FeedJob"}],"actions":[],"children":[{"id":"FeedJoba","else":false,"conds":[{"type":"isOn","target":"FeedJob","state":"on"}],"actions":[{"type":"addTo","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]},{"id":"FeedJobe","else":true,"conds":[],"actions":[{"type":"subtractFrom","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]}]},{"id":"HomeworkJob","else":false,"conds":[{"type":"onToggled","target":"HomeworkJob"}],"actions":[],"children":[{"id":"HomeworkJoba","else":false,"conds":[{"type":"isOn","target":"HomeworkJob","state":"on"}],"actions":[{"type":"addTo","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]},{"id":"HomeworkJobe","else":true,"conds":[],"actions":[{"type":"subtractFrom","var":"Done","value":"1"},{"type":"setText","target":"DoneText","value":"\"Done: \" & Done & \" of 3\""}],"children":[]}]}]}],"device":"web"}

Make it yours: count what's done › A checklist for someone

Open task: any program that does what the step asks.

Stretch and support

Stretch: Show "All done!" when Done is 3: set DoneText to if(Done = 3, "All done!", "Done: " & Done & " of 3"). Or swap ModeButton for a Toggle with the Switch look, and use ModeButton is switched with ModeButton is on.

Support: Give pairs the finished event (the table at the end of Build 5) to copy, then ask them to explain each row.

Exit ticket

A mute button app has two events: Mute clicked and Muted = false → set Muted to true; clicked and Muted = true → set Muted to false. What happens when you click, and how do you fix it?

Both run on one click, so it mutes then straight away unmutes. Fix: one click event with a sub-event (Muted = false → mute) and an Else (unmute).

What each step is for

Where it leads

Next: Water tracker, which keeps a display up to date every tick and checks a goal.