It will be great if you add loop feature :)
Example with 4 params:
$for(<initValue>, <endValue>, <sumValue>, <codeToDoXTimes>)$
It will be great if you add loop feature :)
Example with 4 params:
$for(<initValue>, <endValue>, <sumValue>, <codeToDoXTimes>)$
This is really a great whish, but transforms it more to a programming language.
I would suggest the possibility to store information in an Array/List.
For instance: Store the last (max 5) notifications in a list as a property of globals, of Container.
Within the container you can use an iterate function. which would create an X amount of components, based on the container definition.
Result could be Either a list or a single version with data from the active item in the list.
This could be used with a sequencer global (you can kinda create on in KWLP, but KWGT seems not to work that wel on global formulas). Where a start value and end value is given, with a timer interval.
Timer utils partly supports this, but using a global formula with dynamic Max is not that easy (again for example, amount of notifications).
You can already do this, create a list global called "foo", then you can access items calling $gv(foo, 1)$ to access second element.
What is missing here is a "repeat" group, so a way in items like the "stack" group to repeat elements, you can use $si(mindex)$ to also overcome that, so for example you create a Komponent and you use $si(mindex)$ everywhere which will return the index of the component in its parent. So if you have 5 you just copy paste them and they will use a differnt index.
This will be available via function fl() in 3.23
Would it be possible to add sleep(<ms>) to slow the loop down?
No, but you can do this using a combination of tu() and the loop, so, for example, to show a count up from 1 to 10 every minute you will do something like this
$fl(1, tu(seq, 1, 1, 10), "i+1", i, " ")$
This will write "1" the first minute then "1 2" then "1 2 3" and so on till 10. Actually its a good example, i will add it.
So it is possible in a way. That's a good solution :)