SuggestedTopicTreeclass
A suggested topic that applies to an entire AltTopic group.
Normally, a suggestion is tied to an individual TopicEntry. This means that when a topic has several AltTopic alternatives, each AltTopic can be its own separate, independent suggestion. A particular alternative can be a suggestion or not, independently of the other alternatives for the same TopicEntry. Since each AltTopic is a separate suggestion, asking about one of the alternatives won’t have any effect on the “curiosity” about the other alternatives - in other words, the other alternatives will be separately suggested when they become active.
In many cases, it’s better for an entire set of alternatives to be treated as a single suggested topic. That is, we want to suggest the topic when ANY of the alternatives is active, and asking about any one of the alternatives will satisfy the PC’s curiosity for ALL of the alternatives. This sort of arrangement is usually better for cases where the conditions that trigger the different alternatives aren’t things that ought to make the PC think to ask the same question again.
Use this class by associating it with the *root* TopicEntry of the group of alternatives. You can do this most simply by mixing this class into the superclass list of the root TopicEntry:
- AskTellTopic, SuggestedTopicTree, SuggestedAskTopic
// …
; ++ AltTopic … ; ++ AltTopic … ;
This makes the entire group of AltTopics part of the same suggestion. Note that you must *also* include SuggestedAsk, SuggestedTellTopic, or one of the other specialized types among the superclass, to indicate which kind of suggestion this is.
class
SuggestedTopicTree
:
SuggestedTopic
Superclass Tree (in declaration order)
SuggestedTopicTree
SuggestedTopic
` object`
Subclass Tree
SuggestedTopicTree
SpecialTopic
Global Objects
(none)
Summary of Properties
Inherited from SuggestedTopic
:
associatedTopic
curiositySatisfied
fullName
location
name
suggestionGroup
suggestTo
timesToSuggest
Summary of Methods
associatedTopicIsActive
associatedTopicTalkCount
Inherited from SuggestedTopic
:
associatedTopicCanMatch
findEnclosingSuggestedTopic
findOuterSuggestedTopic
fromEnclosingSuggestedTopic
initializeSuggestedTopic
isSuggestionActive
noteSuggestion
Properties
(none)
Methods
associatedTopicIsActive ( )
OVERRIDDEN
is the associated topic active?
associatedTopicTalkCount ( )
OVERRIDDEN
get the number of previous invocations of the associated topic
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3