diff options
author | Christian Mayer <christian.mayer@student.tugraz.at> | 2010-01-06 18:18:36 (GMT) |
---|---|---|
committer | Christian Mayer <christian.mayer@student.tugraz.at> | 2010-01-06 18:18:36 (GMT) |
commit | dffa0c6d361ceb789265cb12a949c0cdd4f2d5de (patch) | |
tree | 0601ae722a6c59959abe29fa0f48535f596c4428 | |
parent | 11a9b8354b07bd99024ce7938375d4ff519b63df (diff) |
moved Coach#notify('setting-done') into separate method
-rwxr-xr-x | ReckonPrimer.activity/coach.py | 14 | ||||
-rwxr-xr-x | ReckonPrimer.activity/display.py | 2 |
2 files changed, 5 insertions, 11 deletions
diff --git a/ReckonPrimer.activity/coach.py b/ReckonPrimer.activity/coach.py index 26fd1bc..57f95bd 100755 --- a/ReckonPrimer.activity/coach.py +++ b/ReckonPrimer.activity/coach.py @@ -38,13 +38,7 @@ class Coach: def switch_to_settings(self, key): self._ex = self._collect.select(key) self._dis.offer_setting(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.start_calcs(self._ex) - else: - raise Error() - + + def settings_done(self, settings): + self._ex.update_setting(settings) + self._learner.start_calcs(self._ex) diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py index 6f9019d..a2a26ee 100755 --- a/ReckonPrimer.activity/display.py +++ b/ReckonPrimer.activity/display.py @@ -257,7 +257,7 @@ class Display: def release_sett_callback(self, widget): """ Start calcs with these settings (probably updated). """ print('in display.release_sett_callback') - self._co.notify(('setting-done', self._ex._sett)) + self._co.settings_done(self._ex._sett) self.settings_table.hide() #self.collection_table.hide() self.feedback_table_show() |