Closed adheus closed 4 years ago
I have a MaskGroup node(mock) that extends from Group:
<component name="MaskGroup" extends="Group"> <interface> <field id="masksize" type="array" /> <field id="maskOffset" type="array" /> </interface> <script type="text/brightscript" uri="MaskGroup.brs" /> </component>
But when appending it to a another node:
SomeNode.xml
<component name="SomeNode" extends="Group"> <script type="text/brightscript" uri="SomeNode.brs" /> <children> <MaskGroup id="maskGroup"> <Rectangle id="rect1" /> </MaskGroup> <Rectangle id="rect2" /> </children>
SomeNode.brs :
sub init() m.rect1 = m.top.findNode("rect1") m.rect2 = m.top.findNode("rect2") ?"rect1"; m.rect1 ?"rect2:"; m.rect2 end sub
It seems to not find rect1. Output from code above:
rect1 invalid rect2: <Component: roSGNode:Rectangle> = { change: <Component: roAssociativeArray> focusable: false focusedchild: invalid id: rect2 visible: true opacity: 1 translation: <Component: roArray> rotation: 0 scale: <Component: roArray> scalerotatecenter: <Component: roArray> childrenderorder: renderLast inheritparenttransform: true inheritparentopacity: true clippingrect: <Component: roArray> renderpass: 0 muteaudioguide: false enablerendertracking: false rendertracking: disabled width: 0 height: 0 color: 0xFFFFFFFF blendingenabled: true }
Also, if I do maskGroup.getChildCount(), it returns 0.
maskGroup.getChildCount()
0
Great find! Looks like we're not instantiating more than one level deep of children (code here). Thanks for calling it out, should hopefully be a pretty quick fix.
I have a MaskGroup node(mock) that extends from Group:
But when appending it to a another node:
SomeNode.xml
SomeNode.brs :
It seems to not find rect1. Output from code above:
Also, if I do
maskGroup.getChildCount()
, it returns0
.