diff --git a/caster/lib/dfplus/hint/hintnode.py b/caster/lib/dfplus/hint/hintnode.py index 8e1f85060..01f36da97 100644 --- a/caster/lib/dfplus/hint/hintnode.py +++ b/caster/lib/dfplus/hint/hintnode.py @@ -5,9 +5,11 @@ ''' from dragonfly import MappingRule, ActionBase + from caster.lib.dfplus.state.actions import ContextSeeker from caster.lib.dfplus.state.short import L, S + class HintNode: def __init__(self, spec, base, children=[], extras=[], defaults={}): err = str(spec)+", "+str(base)+", "+str(children) @@ -71,7 +73,9 @@ def __init__(self, node, grammar, stat_msg=None, is_reset=False): if self.master_node == None: self.master_node = self.node first = True - self.post = ContextSeeker(forward=[L(S(["cancel"], self.reset_node, consume=False))], rspec=self.master_node.spec) + self.post = ContextSeeker(forward=[L(S(["cancel"], self.reset_node, consume=False), + S([self.master_node.spec], lambda: None, consume=False))], + rspec=self.master_node.spec) if self.stat_msg == None: self.stat_msg = stat_msg @@ -82,7 +86,6 @@ def __init__(self, node, grammar, stat_msg=None, is_reset=False): # each child node gets turned into a mapping key/value for child in self.node.children: child.fill_out_rule(mapping, extras, defaults, self) - if len(mapping)==0: if self.stat_msg!=None and not first: self.stat_msg.text("Node Reset")# status window messaging