previous chapter contents page top page next chapter


SpecialLessonStep

February 29, 1996

mixes in with Viewable;

Class Description

Magic Cap defines class SpecialLessonStep for lesson steps that can be customized with advanced options.

Programming information

Instantiate: sometimes
Subclass: rarely
Call its methods: rarely

You can use special lesson step objects if you want to create lessons with advanced options provided by this class.

Methods defined by class SpecialLessonStep

Class SpecialLessonStep defines the following methods:

Method Description
AcceptTouch Overridden to handle special types; e.g. drop a copy if necessary.
HandleCantContinue Overridden to handle special types; e.g. stop lesson if necessary.
PerformTouch Overridden to handle speical types; e.g. tap list object if necessary.
TouchTarget Overridden to handle special types; e.g. if lesson window is covered.

Fields defined by class SpecialLessonStep

Class SpecialLessonStep defines the following fields:

Field Type Description
Inherited from LessonStep
stepFlags Flags Various settings for lesson and window
stepTargetBox Box Used when target is larger than one viewable
stepTarget Viewable Viewable that step points to
stepBalloonDot Dot Endpoint of balloon spout from lesson window
stepWindowDot Dot Origin of lesson window
stepText Text Text that appears in lesson window
Defined by SpecialLessonStep
specialType Unsigned Defines type of special button
otherObject Object Object associated with step; use depends on special type

Constants used by class SpecialLessonStep

Class SpecialLessonStep defines constants for each possible value in its specialType field. This section lists and describes those constants.

typeDropACopy

#define typeDropACopy 1

Use this constant for special lesson steps that should drop a copy of an object from the Magic Hat.

typeTapListObject

#define typeTapListObject 2

Use this constant for special lesson steps that require the user to tap an object in a list view, such as the Register for mail step that asks the user to tap a particular message in the in box. Field otherObject refers to the object that the user must touch.

typeAutoMoveOnly

#define typeAutoMoveOnly 3

Use this constant for special lesson steps that require the user to slide an object without having to set the move tool.

typeExceptObject

#define typeExceptObject 4

Use this constant for special lesson steps that prevent users from touching a particular set of objects. Magic Cap uses this type for the Using the keyboard lesson step that allows the user to type any keys on the keyboard except the abc-123 switch and the close box. Field otherObject contains an object list of the prohibited objects.

typeSingleWindowObject

#define typeSingleWindowObject 5

Use this constant for special lesson steps that require the user to read the text, then continue when ready.

typeNeedsDeviceOwner

#define typeNeedsDeviceOwner 6

Use this constant for special lesson steps that should stop immediately if Magic Cap has not been personalized.

typeAlsoOKObject

#define typeAlsoOKObject 7

This constant is reserved for future use.

Method Descriptions

AcceptTouch

overrides AcceptTouch

Call: rarely
Override: sometimes

Class SpecialLessonStep overrides AcceptTouch to perform the appropriate action depending on the special type, as described in the Constants section above.

HandleCantContinue

overrides AcceptTouch

Call: rarely
Override: sometimes

Class SpecialLessonStep overrides HandleCantContinue to stop the lesson if its specialType field is typeNeedsDeviceOwner and Magic Cap has not been personalized.

PerformTouch

overrides PerformTouch

Call: rarely
Override: sometimes

Class SpecialLessonStep overrides PerformTouch to handle the cases defined by the special type, as described in the Constants section above.

TouchTarget

overrides TouchTarget

Call: rarely
Override: sometimes

Class SpecialLessonStep overrides TouchTarget to perform the appropriate action depending on the special type, as described in the Constants section above.