comparison pyink/domview.py @ 1470:2a9b9c281f80

Fix wiring error
author Thinker K.F. Li <thinker@codemud.net>
date Sun, 24 Apr 2011 13:39:33 +0800
parents c1e70540541c
children 4a57650bb926
comparison
equal deleted inserted replaced
1469:c1e70540541c 1470:2a9b9c281f80
71 node = self.node 71 node = self.node
72 node.setAttribute('action', action) 72 node.setAttribute('action', action)
73 pass 73 pass
74 74
75 def set_path(self, path): 75 def set_path(self, path):
76 self.paht = path 76 self.path = path
77 node = self.node 77 node = self.node
78 path_txt = ' '.join([str(c) for c in path.strip().split()]) 78 path_txt = ' '.join([str(c) for c in path])
79 node.setAttribute('path', path_txt) 79 node.setAttribute('path', path_txt)
80 pass 80 pass
81 81
82 def reparse(self): 82 def reparse(self):
83 condition = node.getAttribute('condition') 83 condition = node.getAttribute('condition')
1165 path = trn.path 1165 path = trn.path
1166 1166
1167 return cond, target, action, path 1167 return cond, target, action, path
1168 1168
1169 def set_transition_action(self, state_name, cond, action): 1169 def set_transition_action(self, state_name, cond, action):
1170 trn = state.get_transition(state_name, cond) 1170 state = self._get_state(state_name)
1171 trn = state.get_transition(cond)
1171 trn.set_action(action) 1172 trn.set_action(action)
1172 pass 1173 pass
1173 1174
1174 def set_transition_path(self, state_name, cond, path): 1175 def set_transition_path(self, state_name, cond, path):
1175 trn = state.get_transition(state_name, cond) 1176 state = self._get_state(state_name)
1177 trn = state.get_transition(cond)
1176 trn.set_path(path) 1178 trn.set_path(path)
1177 pass 1179 pass
1178 pass 1180 pass
1179 1181
1180 1182