Event Propogation

I’ve written a module to handle the propogation of events between nested forms (e.g. repeating panels with multiple levels):

and a demo of it working:


It delegates the setting of event handlers and raising of events to a separate object which can then be passed around. The idea is to avoid having to call self.parent.parent.parent.... to raise an event somewhere else in the hierarchy.

The demo has three levels of nested repeating panels. There’s an event manager object at the top level which all the descendant forms can access.

Also, at each level, there are separate event manager objects to handle events solely within that branch of the hierarchy.

8 Likes

Now published at github with some instructions:

and included in my cookiecutter project template:

5 Likes