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
That is an okay solution ( except for the code generation of the not-visible elements in the container).
But The goal of a container is a serialization of the elements in an auto layout.
I would love to use it in a for-in statement but i am stuck since I can't predict the calls by direct component instance reference like the previous PrinterContainer.print() function.
I can really admit i don't have a good understanding of the slint architecture so if a simple solution exist i would be glad to hear it!
But i do think callback overloading might be a good functionality.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Based on composition over inheritance recommendation , I would like to achieve a function or callback overloading to use in repetition element or conditional element
here is a simple example :
For this I though i could do someting like this
But i can't addres myFoo either myBar
The only solution i found was :
That is an okay solution ( except for the code generation of the not-visible elements in the container).
But The goal of a container is a serialization of the elements in an auto layout.
I would love to use it in a for-in statement but i am stuck since I can't predict the calls by direct component instance reference like the previous PrinterContainer.print() function.
I can really admit i don't have a good understanding of the slint architecture so if a simple solution exist i would be glad to hear it!
But i do think callback overloading might be a good functionality.
for example here is a detailed demo to play with
Here is a simple demo i have made
Thank you in advance
Antoine
EDIT Question also posted on so
Beta Was this translation helpful? Give feedback.
All reactions