Skip to content

Instantly share code, notes, and snippets.

@jfrux
Last active April 20, 2020 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfrux/cdfceb1c11709c94ff55ae5471da1a40 to your computer and use it in GitHub Desktop.
Save jfrux/cdfceb1c11709c94ff55ae5471da1a40 to your computer and use it in GitHub Desktop.
sub init()
' ...
m.itemsListNode = m.top.findNode("tickerItems")
' ...
end sub
' ...
sub onContentChange()
if m.top.itemsList <> invalid
m.itemsListNode.insertChildren(m.top.itemsList)
end if
end sub
' ...
<?xml version="1.0" encoding="utf-8" ?>
<component
name="VideoTicker"
extends="Group"
xsi:noNamespaceSchemaLocation="https://devtools.web.roku.com/schema/RokuSceneGraph.xsd"
>
<script type="text/brightscript" uri="VideoTicker.brs" />
<!-- ... -->
<interface>
<field id="itemsList" type="array" onChange="onContentChange" />
</interface>
<children>
<VideoTickerItems id="tickerItems" />
</children>
</component>
<component name = "VideoTickerItem" extends="SimpleLabel">
</component>
<component name = "VideoTickerItems" extends="ContentNode">
</component>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment