-
Notifications
You must be signed in to change notification settings - Fork 756
examples: Added a little example that shows how to use asynchronous h… #9468
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
base: master
Are you sure you want to change the base?
Conversation
2aa9d1d
to
254eb13
Compare
580ef07
to
b93beb6
Compare
{ | ||
name: "AAPL", | ||
price: 237.96, | ||
}, | ||
{ | ||
name: "MSFT", | ||
price: 509.24, | ||
}, | ||
{ name: "AMZN", price: 232.94 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this default value was used to develop the UI in the first place, but now it's kind of useless because it's immediately replaced with the contents of the model coming from the backend? How about making this an empty array here?
(as is, it's a bit confusing because "AMZN.US" != "AMZN" and because this data is - if I'm not missing anything - basically not used)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we tend to have some data in there so that the live-preview doesn't show an empty ui. I'll change it to clarify with a comment that this is to be replaced at run-time and I'll sync the ticker symbols.
b93beb6
to
fcc1ca3
Compare
fcc1ca3
to
51529b6
Compare
1fa92c3
to
ef87035
Compare
84f056b
to
4c66ce9
Compare
4c66ce9
to
457fc86
Compare
Renamed to |
…ttp requests with Slint This is a little "stock ticker" that when manually refreshed uses async Rust and Python APIs to request new prices from a website and update a Slint model. In Rust, this demonstrates the use of `slint::spawn_local()` and in Python the use of our asyncio integration.
c9bd7f3
to
f531f56
Compare
…ttp requests with Slint
This is a little "stock ticker" that when manually refreshed uses async Rust and Python APIs to request new prices from a website and update a Slint model.
In Rust, this demonstrates the use of
slint::spawn_local()
and in Python the use of our asyncio integration.