tipManager object | tips.t[23]

The tip manager keeps track of which tips we have shown. Since we don't want to unnecessarily show any tips more than once, we store this information both transiently (in the tipManager) and persistently (in the tip objects themselves). This should make sure that we at least cover these two types of cases:

- The player sees a tip, then restarts, undos or restores to an earlier position. - The player sees a tip, saves, then resumes play at some later time.

`transient tipManager : InitObject PostRestoreObject PostUndoObject`

Superclass Tree (in declaration order)

`tipManager`
`InitObject`
`ModuleExecObject`
`object`
`PostRestoreObject`
`ModuleExecObject`
`object`
`PostUndoObject`
`ModuleExecObject`
`object`

Summary of Properties

`pendingTips shownTips`

``

Inherited from `ModuleExecObject` :
`execAfterMe execBeforeMe hasInitialized_ isDoingExec_ isExecuted_`

Inherited from `PostRestoreObject` :
`restoreCode`

``

``

``

Summary of Methods

`execute showTips`

``

Inherited from `ModuleExecObject` :
`_execute classExec`

``

``

``

``

Properties

`pendingTips` | `tips.t[76]`

a vector of tips to be displayed before the next prompt

`shownTips` | `tips.t[87]`

A transient list of shown tips. Note that this must be a list and not a vector. When updating a list, we actually replace it with a new list, since lists are immutable. This is a transient change - it affects only the value of the shownTips property. Updating a vector, however, modifies the vector itself and leaves the property with the same reference. A vector itself is always persistent, so this change would be lost after E.G. a restore.

Methods

`execute ( )`OVERRIDDEN | `tips.t[45]`

update tip information after a restore, restart or undo

`showTips ( )` | `tips.t[28]`

Show pending tips. This is called by a PromptDaemon before each new round of input.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3