Something went wrong when running the Event example #5216
Replies: 4 comments 10 replies
-
what do you want? |
Beta Was this translation helpful? Give feedback.
-
Thanks for bringing this up, @v479038280! I agree that this demo is a bit too minimal. And we missed to try the code in isolation: Apparently it doesn't work in script mode (without page functions). A better example might be something like this: data_updated = Event()
@ui.page('/')
def page():
data_updated.subscribe(lambda: ui.notify('Data has been updated'))
@ui.page('/data')
def data_page():
ui.button('Update data', on_click=data_updated.emit) There is a global event |
Beta Was this translation helpful? Give feedback.
-
I just created PR #5221 to improve the demos. |
Beta Was this translation helpful? Give feedback.
-
@v479038280 The |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Every time I run the Event example I got this error in the terminal .The application is running smoothly except for this.
Here is the example code
Additionally, this section of code actually has the same function as the one below. I wonder what greater purpose this implementation method serves.
Beta Was this translation helpful? Give feedback.
All reactions