You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the following application to crash when the button is pressed:
fromtextual.appimportApp, ComposeResultfromtextual.containersimportVerticalfromtextual.widgetsimportButton, LabelclassShouldCrash( Label ):
defon_hide( self ) ->None:
_=1/0classNoHideApp( App[ None ] ):
CSS=""" Vertical { align: center middle; } """defcompose( self ) ->ComposeResult:
withVertical():
yieldButton( "Press to hide the label below" )
yieldShouldCrash( "Press the button above me to hide me" )
defon_button_pressed( self ):
self.query_one( ShouldCrash ).display=Falseif__name__=="__main__":
NoHideApp().run()
However, when the button is pressed; it doesn't. It would appear that the Hide message isn't being sent. Looking in the debug console I don't see the event.
The same is true if I attempt to hide the widget using any of:
self.query_one( ShouldCrash ).display="none"self.query_one( ShouldCrash ).visible=Falseself.query_one( ShouldCrash ).set_class( True, "hidden" ) # With appropriate CSS to back it up.
The text was updated successfully, but these errors were encountered:
I would expect the following application to crash when the button is pressed:
However, when the button is pressed; it doesn't. It would appear that the
Hide
message isn't being sent. Looking in the debug console I don't see the event.The same is true if I attempt to hide the widget using any of:
The text was updated successfully, but these errors were encountered: