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
Currently, an enum that is defined in slint can not be given to the Text component as an input, a callback needs to be implemented in Rust to do the conversion.
Ideally, I would directly use the enum text as an input to the text.
Example:
enumDirection {
Right,Left
}
Text {
text : Direction.Right;
}
that would be seen as "Right" on the screen.
Product Impact
We are a railway company building Remote Supervision Control Desktop application for a locomotive.
It would reduce the code and time.
The text was updated successfully, but these errors were encountered:
I don't feel very comfortable with this. Other programming languages don't do this typically out of the box with enums and use reflection instead. And to make matters worse: this doesn't play well with translations.
Perhaps we need a way to more easily create mappings? Like a match on an enum that errors when not all variants are covered.
Feature Description
Currently, an enum that is defined in slint can not be given to the Text component as an input, a callback needs to be implemented in Rust to do the conversion.
Ideally, I would directly use the enum text as an input to the text.
Example:
that would be seen as "Right" on the screen.
Product Impact
We are a railway company building Remote Supervision Control Desktop application for a locomotive.
It would reduce the code and time.
The text was updated successfully, but these errors were encountered: