Commit 1032f8d
authored
make control a cooperative object (#490)
I used the observer pattern to propagate changes in a usercontrol object. For that purpose my widget derives from UserControl and another class. Calling super().__init__() in my class did not work because I had the wrong order in the class calls, i.e., class MyWidget(UserControl, Subject), rather than class MyWidget(Subject, UserControl). By including super().__init__() in the Control class such points of confusion are easy to prevent. Here is a further discussion:
https://rhettinger.wordpress.com/2011/05/26/super-considered-super/1 parent 8897090 commit 1032f8d
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
0 commit comments