kivy: “Invalid property name” error message for a valid property name
问题 If I put this into the main program: class MyTextInput(TextInput): def on_focus(self, *args, **kwargs): print("Yay!", args, kwargs) And this into the kv file: #: import MyTextInput __main__.MyTextInput MyTextInput: id: e_birth_date text: "" size_hint_x: 1 Then the behaviour is correct, this is printed whenever the text input gets or looses the focus: Yay! (<__main__.MyTextInput object at 0x0CC1B8B8>, True) {} Yay! (<__main__.MyTextInput object at 0x0CC1B8B8>, False) {} However, this does not