Hi,
I am trying to use “raise-event on children” to raise events on forms that are loaded dynamically by a “Main” form.
Main Form
- has timer component, set to 5 second interval in design mode
- has column panel & flow panel that contain 4 forms (as components)
def timer_1_tick(self, **event_args):
"""This method is called Every [interval] seconds. Does not trigger if [interval] is 0."""
self.content_panel.raise_event_on_children("x-Timer-Tick")
Child Form
def __init__(self, tabSize = 400, **properties):
# Set Form properties and Data Bindings.
self.init_components(**properties)
# Set Form Event Handlers
self.set_event_handler("x-Timer-Tick", self.TimerTick)
def TimerTick(self, **kw):
print('feed timer tick') # this never prints
To make sure that the event was working within the Child Form, I tested it by raising the event at the end of the init and that worked great.
So it would seem to me that the raise_event_in_children isn’t raising it in what I would have considered to be a child form?
Any help is appreciated!