mixes in with Viewable;
Magic Cap defines class SpecialLessonStep for lesson steps that can be customized with advanced options.
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.
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. |
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 |
Class SpecialLessonStep defines constants for each possible value in its specialType field. This section lists and describes those constants.
#define typeDropACopy 1
Use this constant for special lesson steps that should drop a copy of an object from the Magic Hat.
#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.
#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.
#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.
#define typeSingleWindowObject 5
Use this constant for special lesson steps that require the user to read the text, then continue when ready.
#define typeNeedsDeviceOwner 6
Use this constant for special lesson steps that should stop immediately if Magic Cap has not been personalized.
#define typeAlsoOKObject 7
This constant is reserved for future use.
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.
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.
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.
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.