Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Mayer <christian.mayer@student.tugraz.at>2010-01-06 17:46:11 (GMT)
committer Christian Mayer <christian.mayer@student.tugraz.at>2010-01-06 17:46:11 (GMT)
commit154d450518fd1d7fd8001a87392909c8296f4c4a (patch)
tree2555682622e6e934018c7a8d6a787e912d0cae56
parent51afbd957f1e6b8ab7ab8db862f0e25cd9a30311 (diff)
moved Coach#notif('exerc-selected') into separate method
-rwxr-xr-xReckonPrimer.activity/coach.py8
-rwxr-xr-xReckonPrimer.activity/display.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/ReckonPrimer.activity/coach.py b/ReckonPrimer.activity/coach.py
index 3406c08..a8bc09f 100755
--- a/ReckonPrimer.activity/coach.py
+++ b/ReckonPrimer.activity/coach.py
@@ -31,16 +31,16 @@ class Coach:
self._dis.offer_coll_to_learner(self._collect)
# calls back with notify('exerc-selected'... OR 'switch-to-setts'
+ def exercise_selected(self, key):
+ self._ex = self._collect.select(key)
+ self._learner.notify(('start-calcs', self._ex))
+
def notify(self, (msg, data)):
"""called by the observed objects"""
print("in coach.notify: msg=, data=", (msg, data))
if msg == 'setting-done': # from display
self._ex.update_setting(data)
self._learner.notify(('start-calcs', self._ex))
- elif msg == 'exerc-selected': # from collection
- self._ex = self._collect.select(data)
- print('in coach.notify(exerc-selected), _sett=',self._ex._sett)
- self._learner.notify(('start-calcs', self._ex))
elif msg == 'switch-to-setts': # from display
self._ex = self._collect.select(data)
self._dis.offer_setting(self._ex)
diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py
index 4e93400..3d9b992 100755
--- a/ReckonPrimer.activity/display.py
+++ b/ReckonPrimer.activity/display.py
@@ -421,7 +421,7 @@ class Display:
from Collection.select_exerc_callback. """
print('in display.finish_learner_coll_callback, _coll_key=', self._coll_key)
if not(self._coll_key is None):
- self._co.notify(('exerc-selected', self._coll_key))
+ self._co.exercise_selected(self._coll_key)
self.collection_table.hide()
self.feedback_table_show()