Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/ReckonPrimer.activity/coach.py
diff options
context:
space:
mode:
Diffstat (limited to 'ReckonPrimer.activity/coach.py')
-rwxr-xr-xReckonPrimer.activity/coach.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ReckonPrimer.activity/coach.py b/ReckonPrimer.activity/coach.py
index ae86d12..b561a9c 100755
--- a/ReckonPrimer.activity/coach.py
+++ b/ReckonPrimer.activity/coach.py
@@ -23,17 +23,21 @@ class Coach:
""" This preliminary version just lets the Learner select. """
#print("in coach.request_exercise")
self._dis.offer_coll_to_learner(self._collect)
- # calls back with notify('exerc-selected'...
+ # calls back with notify('exerc-selected'... OR 'switch-to-setts'
def notify(self, (msg, data)):
"""called by the observed objects"""
- #print("in coach.notify: msg=, data=", (msg, data))
+ 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)
- #WN091215 self._dis.offer_setting(self._ex)
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)
+ else:
+ raise Error()