previous chapter contents page top page next chapter


LessonCard

February 29, 1996

mixes in with Viewable;

Class Description

When you create Magic Cap lessons, you collect the lessons together on lesson cards. Magic Cap provides class LessonCard for this purpose.

Programming information

Instantiate: sometimes
Subclass: rarely
Call its methods: rarely

Lesson cards are part of the framework for lessons. Lesson cards include fields that refers to the important parts of the lesson on the card.

Methods defined by class LessonCard

Class LessonCard defines the following methods:

Method Description
AboutToShow Overridden to prepare lesson before use.
AboutToHide Overridden to stop observing lesson before hiding.
Notice Overridden to change lesson button after lesson is completed.

Fields defined by class LessonCard

Class LessonCard defines the following fields:

Field Type Description
Inherited from SingleLinkable
next Object Next item in view list
Inherited from Linkable
previous Object Previous item in view list
Inherited from Viewable
superview Viewable Container for this object
subview Viewable Object contained by this object
relativeOrigin Dot Origin relative to superview
contentSize Dot Size of content rectangle
viewFlags Flags Property settings
labelStyle TextStyle Text style of object's label
color Color Color of object's content
shadow Shadow Shadow drawn with object
sound Sound Sound associated with object
Inherited from Card
form Form Form associated with this card
stack StackOfCards Stack that this card belongs to
cardFlags Unsigned Various settings for this card
Defined by LessonCard
lessonButton Button Button that starts lesson
repeatName Text Button name after lesson is completed
lessonField TextField Text field with variable text
normalText Text Text if conditions are met before lesson
repeatText Text Text if conditions are met after lesson
conditions ObjectList Conditions to be met

Method Descriptions

AboutToShow

overrides AboutToShow

Call: rarely
Override: sometimes

Class LessonCard overrides AboutToShow to check the lesson's conditions and set the lesson button and text fields appropriately.

AboutToHide

overrides AboutToHide

Call: rarely
Override: sometimes

Class LessonCard overrides AboutToHide to stop observing the lesson for completion before putting the lesson away.

Notice

overrides Notice

Call: rarely
Override: sometimes