textual
textual copied to clipboard
Both parent's and child's [on_mount] method are called in runtime
Defining an [on_mount] method in the child class would cause [on_mount] method being called from both the parent and the child class.
e.g.
# During runtime, both messages will be printed
class Parent(App):
def on_mount(self):
print("triggered")
class Child(Parent):
def on_mount(self):
print("triggered in child")
I think this is intentional, see https://textual.textualize.io/guide/events/#default-behaviors
Ah sorry my bad, thanks a lot!