?index tops:for (2 4)
On Aug 6, 2019, at 12:17 PM, Jack Hodges <jhodg...@gmail.com> wrote:
I would like to perform a while or do-while iteration with SWP. That is, condition based rather than item based as in ui:foreach. I see nothing in the manual about it so I'll look in the libraries but thought I ask in parallel. I do not know if a ui:if and a ui:foreach can produce the same results. Any pointers to examples or documentation appreciated.Jack
--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/849cd590-7cfa-4068-b93f-9516ab7c2fcf%40googlegroups.com.
All queries in SWP, such as the result set of a ui:forEach, are computed at once, i.e. there is no way to dynamically change the loop based on things happening inside of the loop. There is no ui:while either - I guess we just never had use cases for that. An alternative to while is to do a recursive loop similar to functional programming, e.g. define ui:MyElement which has a prototype with a ui:if... and then calling <ui:MyElement /> again until the if is false. This approach however can run into stack overflows, i.e. only works for certain traversal depths.
Holger
I would like to perform a while or do-while iteration with SWP. That is, condition based rather than item based as in ui:foreach. I see nothing in the manual about it so I'll look in the libraries but thought I ask in parallel. I do not know if a ui:if and a ui:foreach can produce the same results. Any pointers to examples or documentation appreciated.
Jack
All queries in SWP, such as the result set of a ui:forEach, are computed at once, i.e. there is no way to dynamically change the loop based on things happening inside of the loop. There is no ui:while either - I guess we just never had use cases for that. An alternative to while is to do a recursive loop similar to functional programming, e.g. define ui:MyElement which has a prototype with a ui:if... and then calling <ui:MyElement /> again until the if is false. This approach however can run into stack overflows, i.e. only works for certain traversal depths.
Holger
On 7/08/2019 02:17, Jack Hodges wrote:
I would like to perform a while or do-while iteration with SWP. That is, condition based rather than item based as in ui:foreach. I see nothing in the manual about it so I'll look in the libraries but thought I ask in parallel. I do not know if a ui:if and a ui:foreach can produce the same results. Any pointers to examples or documentation appreciated.--
Jack
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbrai...@googlegroups.com.
On 29 Nov 2019, at 22:13, Michael Phelan <mph...@gmail.com> wrote:Are there examples of:1. returning a value from a ui:Operations subclass
2. assigning a variable the value of the result of a ui:Operations subclass
3. updating an Argument in Pass By Reference style