I'm using Xpert.ivy Designer 5.1.0 (Lauberhorn) S6. I tried to fill a List in a loop:
To better understand, please watch the screencast on YouTube (2 minutes). An answer until 25.11. evening would be very appreciated. [EDIT]: Here the link to the iar-File for testing. asked 22.11.2013 at 10:52 Björn |
With the input of Daniel Oechslin I was able to make a simple solution without the code element. I use the funtion deepClone to generate a new listEntry-Object each run. See the picture below. answered 22.11.2013 at 13:28 Björn 1
Hi again a clone(); would be enough. deepclone(); you only need in case of lists or objects relating to other object.
A clone() would copy the treeName and an empty List treeBranches. A deepClone() would copy the treeName and the List and every instance wihtin this list.
(22.11.2013 at 13:34)
Daniel Oechslin
Thanks for the clarification! Have a nice weekend.
(22.11.2013 at 13:40)
Björn
|
Hi Björn I added this:
in a script step between your XOR and the Dialog (Collect attributes for one entry in the demo list) It works fine and I don't see any extra time consuming factor. Please remember that you can disable the animation. A scriptstep animation is shown slower by Default. The correct behavior of this Addition would be to have a result as the following:
Cheers to the ZHAW The scheme shown in the Ivy.Designer: answered 22.11.2013 at 11:37 Daniel Oechslin |
Hi Björn Concerning your second run (Add list entry to demo list I (doesn't work)): I think the behavior you scripted is what it should be. The problem is, that you use the same 'in.demoListEntry' twice. You don't instatiate a new one before entering the new Dialog data. You should add something like:
The same Problem should apply to you third run. answered 22.11.2013 at 11:05 Daniel Oechslin Hi Daniel Thanks for your answer. But I'm not fully satisfied with it: 1. Your solution would be as time consuming as the Variant III, especially if there are not only two attributes but 20. 2. It is the same object 'in.demoListEntry', but not with the same values in the two runs. 2. If your idea is correct, then I would expect, that in the result two times the first entry will be displayed (a, aa) and not the second one (b, bb). I will add a link in my question to the iar-File so you can test yourself.
(22.11.2013 at 11:15)
Björn
1
(22.11.2013 at 11:23)
Daniel Oechslin
This makes sense. Now I understand the reason for the behaviour. With my scenario the DemoList contains multiple times the same DemoListEntry. Thank you very much. Because of this comment I was able to make your solution even more simple (see below in a minute).
(22.11.2013 at 13:25)
Björn
|
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 22.11.2013 at 10:52
Seen: 8,000 times
Last updated: 22.11.2013 at 13:40