Collection of graph |
Post Reply |
Author | |||
Gali
Contributor Joined: 28.Jun.2018 Points: 10 |
Post Options
Thanks(0)
Posted: 02.Jul.2018 at 03:51 |
||
Hello, I define an object (Event) in which one attribute (scenes) is a collection of another graph(SceneDesign). Now I want to output everything in all the scenes in the event. what should I do. Gali
|
|||
stevek
MetaCase Joined: 11.Mar.2008 Points: 641 |
Post Options
Thanks(0)
|
||
You can use do to iterate over the collection property, and inside each Scene Design graph there you can use foreach to iterate over the objects there:
Better style is to refactor the parts inside Scene Design into a new generator, which you write in the Scene Design graph type. The top-level generator thus has:
and in a new Generator Editor in Scene Design:
It's important to save generators in the right graph type. When calling a sub-generator, it is looked up in the generators of the current graph's type. The current graph changes when you navigate into a different graph, as you do here inside do :scenes {_Contents()}. The sub-generator _Contents() will thus be looked up in the generators of the Scene Design graph type.
Edited by stevek - 02.Jul.2018 at 08:47 |
|||
Gali
Contributor Joined: 28.Jun.2018 Points: 10 |
Post Options
Thanks(0)
|
||
Thank you~
|
|||
Post Reply | |
Tweet |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |