SV: SV: [Tutor] Stuck with classes - events
Danny Kohn
danny.kohn@systematik.se
Fri, 5 Oct 2001 21:49:02 +0200
| Fran: tutor-admin@python.org [mailto:tutor-admin@python.org]For Sean
| 'Shaleh' Perry
| Skickat: den 5 oktober 2001 16:46
| Till: Danny Kohn
| Kopia: Python Tutor mailing list
| Consider this. When item A gets a Ctrl+Left click it tells its=20
| parent to make it the current object.
And how is this "telling" done in practice in oop? I am very new to =
this.
| The parent then makes item A the current=20
| object (gives
| focus, etc). Essentially the object tells its controller "my=20
| turn please".
|=20
| parent.givefocus(child) called from within child.handleKeyPress().
Again, yes this is what I want to do but I don't understand how to do =
it.
Could you elaborate slightly? How do I transfer control the way you =
describe. Does it imply a special way of making classes and attributes?
/Danny