10-25-2011 02:06 PM
I am basically trying to determine programatically if a class is a child of a specific parent class OR along the same lines I need a list of all children of a parent class. Either method would work. Is this possible to do via code?
Solved! Go to Solution.
10-25-2011 02:18 PM
Getting a list of all children is impossible, since you have no way of knowing if all the children are loaded or not. Checking the inheritance is simple, however. First, if the wire is of a specific class, you can simply use the To More Generic Class primitive and figure it out at edit time. If the wire is of a more generic class, you can use the Preserve Run-Time Type primitive and check the error output. I haven't checked, but I believe this should work.
10-25-2011 02:26 PM - edited 10-25-2011 02:27 PM
And an image to go with Yair's reply...
If no error then it is a child.
More LVOOP images here.
See this thread for more words.
Ben
PS: An yes that error wire should be wired between the loops.
10-25-2011 02:44 PM
Good call; Preserve Run-Time Class will error when it has the incorrect parent. Thanks for the help!!