DigHT 310
In-class Exercise
Creating Program Structures
In this exercise we'll be using the innate structure of LiveCode to rapidly
create program structures similar to those we discussed in class.
1. Create a simple linear program structure.
- All handlers should be in a background group script or the scripts
of grouped objects.
- All buttons and fields should be in a single group and that group should be on each card.
- Every card or page should display a Next and a Previous button. The
Previous button should be automatically disabled on the first card,
and the Next button should be automatically disabled on the last card.
- Each card should display a field telling which card you are currently
on; i.e., "Card 2 of 5".
2. Create an open branching program structure.
- The program should include a main menu with at least three choices.
- There should be a separate background group for each branch.
- Each branch should be visually different from the other branches in some obvious way—background color, labels, or something else easy to spot.
- In each branch all handlers should be in the group script (or even higher
in the hierarchy, as appropriate) or the scripts of grouped objects.
- In each branch all buttons and fields should be in a single group and that group should be on each card.
- Every card in the branches should display a Next and a Previous
button. The Previous button should be automatically disabled on the first
card of the branch, and the Next button should be automatically
disabled on the last card of the branch.
- Each card or page should display a field telling which card in the
branch you are currently on; i.e., "Card 2 of 5".
- In each branch there should be a button that takes the user
back to the main menu. This button may be in each branch group, or it may be
in a group, separate from the branch groups, that is placed on each card
of the three branches.
3. Create a a Strict Branching
structure by copying and modfying the Open Branching structure stack. This involves
making the Return to Menu button only available on the last card of each branch.
When you are finished, drop your stacks into the Homework Drop folder on the
server. Be sure to label them with your name. Due by next class period.
Back
BYU LiveCode Lessons Gateway
Maintained by
Devin Asay.
Copyright © 2005 Brigham Young University.
This page last updated on June 06, 2017 10:07:48.