-
Notifications
You must be signed in to change notification settings - Fork 446
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calling update()
inside Control.did_mount()
causes deadlock
#489
Comments
Hey, will it now be possible to easily access |
Sure, it's possible now. |
Hi, coming from #488 which was merged in favor of this. The issue described there still seems present in both import flet
class userCtrl(flet.UserControl):
def build(self):
return [flet.Container(bgcolor=flet.colors.RED, width=self.page.width, height=100000)]
def main(page: flet.Page):
page.add(
userCtrl()
)
flet.app(
target=main, web_renderer="html", assets_dir=".", port=3768
# , view=flet.WEB_BROWSER
)
|
Control tree is updated with a page instance only after its changes sent to a UI. |
Ah I see Thank you for clarifying |
Sample code causing deadlock:
Solution:
Go through a list of added controls after
update()
is finished and lock released and calldid_mount()
for each added control.The text was updated successfully, but these errors were encountered: