diff 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
line wrap: on
line diff
--- a/pyink/domview.py	Sun Apr 24 12:30:47 2011 +0800
+++ b/pyink/domview.py	Sun Apr 24 13:39:33 2011 +0800
@@ -73,9 +73,9 @@
         pass
 
     def set_path(self, path):
-        self.paht = path
+        self.path = path
         node = self.node
-        path_txt = ' '.join([str(c) for c in path.strip().split()])
+        path_txt = ' '.join([str(c) for c in path])
         node.setAttribute('path', path_txt)
         pass
 
@@ -1167,12 +1167,14 @@
         return cond, target, action, path
 
     def set_transition_action(self, state_name, cond, action):
-        trn = state.get_transition(state_name, cond)
+        state = self._get_state(state_name)
+        trn = state.get_transition(cond)
         trn.set_action(action)
         pass
 
     def set_transition_path(self, state_name, cond, path):
-        trn = state.get_transition(state_name, cond)
+        state = self._get_state(state_name)
+        trn = state.get_transition(cond)
         trn.set_path(path)
         pass
     pass