Proposal to Use __events__
instead of register_event_type
#1726
Labels
Status: Needs analysis
Issue needs to be analyzed if it's real
Type: Enhancement
Feature request/Feature implementation
Description of the Feature
So kivy has two ways for registering an event, one way is to use
register_event_type
method, which involves calling this method at the__init__
level. But there's a drawback on this approach; this does not allow binding an event during when an object is created. Example code of binding an event object during object creation, assumingon_fire
to be the event:But with the current implementation of event registering in kivymd, you get to write two lines of code
A quick fix for this while using
register_event_type
would be to callregister_event_type
beforesuper
Example code:
A more cleaner fix would be
The text was updated successfully, but these errors were encountered: