tests/events.py
changeset 46 2b43a7f38c34
parent 45 43b2279b06e1
equal deleted inserted replaced
45:43b2279b06e1 46:2b43a7f38c34
    19         print('A after', ev.keyname, self)
    19         print('A after', ev.keyname, self)
    20 
    20 
    21 
    21 
    22 class B(A):
    22 class B(A):
    23     def __init__(self):
    23     def __init__(self):
    24         super().__init__()
    24         A.__init__(self)
    25 
    25 
    26     def on_keypress(self, ev):
    26     def on_keypress(self, ev):
    27         """B"""
    27         """B"""
    28         print('B on', ev.keyname, self)
    28         print('B on', ev.keyname, self)
    29         #return True
    29         #return True
    33         print('B after', ev.keyname, self)
    33         print('B after', ev.keyname, self)
    34 
    34 
    35 
    35 
    36 class C(B):
    36 class C(B):
    37     def __init__(self):
    37     def __init__(self):
    38         super().__init__()
    38         B.__init__(self)
    39 
    39 
    40 
    40 
    41 def on_keypress(ev):
    41 def on_keypress(ev):
    42     """global"""
    42     """global"""
    43     print('global on', ev.keyname)
    43     print('global on', ev.keyname)