Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalther Neuper <neuper@neuper.(none)>2009-12-16 11:45:20 (GMT)
committer Walther Neuper <neuper@neuper.(none)>2009-12-16 11:45:20 (GMT)
commit597276ae03251fc1e71fdf20467d1c794c3c232e (patch)
tree398cdae273174bed40f98e5763b9bbacad877a1e
parentee3fec155d170b9a8a801bc28e0f6934043b185f (diff)
added collection/test_, started debug setts
-rwxr-xr-xReckonPrimer.activity/coach.py7
-rwxr-xr-xReckonPrimer.activity/display.py6
-rwxr-xr-xReckonPrimer.activity/exercise.py12
-rw-r--r--ReckonPrimer.tests/collection/test_collection_MM091214.py63
4 files changed, 20 insertions, 68 deletions
diff --git a/ReckonPrimer.activity/coach.py b/ReckonPrimer.activity/coach.py
index b561a9c..ceae232 100755
--- a/ReckonPrimer.activity/coach.py
+++ b/ReckonPrimer.activity/coach.py
@@ -18,6 +18,13 @@ class Coach:
self._dis = dis
self._collect = collect
self._learner = learner
+# print('in coach.register, exaddsimp =', self._collect.select(0))
+# print('in coach.register, exaddsimp._display =', self._collect.select(0)._display)
+# print('in coach.register, expassten =', self._collect.select(1))
+# print('in coach.register, extimesdiv=', self._collect.select(2))
+# print('in coach.register, =')
+# print('in coach.register, =')
+# print('in coach.register, =')
def request_exercise(self):
""" This preliminary version just lets the Learner select. """
diff --git a/ReckonPrimer.activity/display.py b/ReckonPrimer.activity/display.py
index 531963d..b94020e 100755
--- a/ReckonPrimer.activity/display.py
+++ b/ReckonPrimer.activity/display.py
@@ -87,9 +87,9 @@ class Display:
self.scrolled_window.show()
# 3 tables as overlays with same 15 lines and 6 columns
- self.settings_table = gtk.Table (14, 10, True)
- self.collection_table = gtk.Table(14, 10, True)
- self.feedback_table = gtk.Table (14, 10, True)
+ self.settings_table = gtk.Table (14, 9, True)
+ self.collection_table = gtk.Table(14, 9, True)
+ self.feedback_table = gtk.Table (14, 9, True)
# Insert the 3 tables into the right half of the screen
self.table.attach(self.settings_table, 1, 2, 0, 5)
diff --git a/ReckonPrimer.activity/exercise.py b/ReckonPrimer.activity/exercise.py
index 69ceeac..c824214 100755
--- a/ReckonPrimer.activity/exercise.py
+++ b/ReckonPrimer.activity/exercise.py
@@ -63,11 +63,19 @@ class Exercise:
pass
def define_buttons(self):
- """ Define buttons for update settings including callbacks. """
+ """ Define buttons for update settings including callbacks.
+ The widgets are local to exerc-instances and attached to the display:
+ # self.butt.connect('toggled',self.butt_callback)
+ # self._display.settings_table.attach(self.butt, 1,2,3,4)
+ And the callbacks run locally, but read and write in the display:
+ # def butt_callback(self, widget)
+ # if widget.get_active():
+ # self._display._sett['+'] = True
+ """
pass
def set_buttons(self, sett):
- """ Display buttons according to the current setting. """
+ """ Display buttons according to the current setting sett. """
pass
#===== methods is used by more than one subclass
diff --git a/ReckonPrimer.tests/collection/test_collection_MM091214.py b/ReckonPrimer.tests/collection/test_collection_MM091214.py
deleted file mode 100644
index 8e1134b..0000000
--- a/ReckonPrimer.tests/collection/test_collection_MM091214.py
+++ /dev/null
@@ -1,63 +0,0 @@
-# -*- coding: UTF8 -*-
-"""tests on collection class"""
-
-class collection:
-
- def __init__(self, name):
- self._data = []
- self._name = name
- self._pic = ""
-
- def add(self, x):
- self._data.append(x)
-
- def delete(self, n):
- del self._data[n]
-
- def show(self, top):
- """ prints recursively all elements of this collection """
- #only for test reasons
- print("**********")
- print "collection: ", self._name
- print "elements:"
- for el in self._data:
- el.show(False)
- print "---- end of ", self._name
- if top:
- print # print an empty line after the last element
-
-class task:
- def __init__(self, name):
- self._name = name
- def show(self, top):
- print "task: ", self._name
-
-
-root = collection("root")
-c1 = collection("c1")
-t1 = task("t1")
-t2 = task("t2")
-c1.add(t1)
-c1.add(t2)
-c3 = collection("c3")
-c3.add(t2)
-c3.add(t1)
-c1.add(c3)
-root.add(c1)
-# created: [[t1, t2, [t2, t1]]]
-root.show(True)
-
-# Versuch in einer Schleife dynamisch auf ein mit Koordinaten spezifiertes Object zuzugreifen
-co=[0,2] # Koordinaten
-print "pick element ", co
-el = root
-for n in co:
- el = el._data[n]
-
-el.show(True) # gewähltes Element anzeigen
-
-# funktioniert!
-
-
-
-