m.getHomeOptionsList = createObject("roSGNode", "getLabelListContent")
m.getHomeOptionsList.setField("uri", "http://www.sdktestinglab.com/homeoptionslistcontent.xml")
m.getHomeOptionsList.observeField("content", "showhomeoptionslist")
m.getHomeOptionsList.functionName = "showhomeoptionslist"
m.getHomeOptionsList.control = "RUN"
<?xml version = "1.0" encoding = "utf-8" ?>
<!--********** Copyright 2015 Roku Corp. All Rights Reserved. **********-->
<component name = "getLabelListContent" extends = "Task" >
<interface>
<field id = "uri" type = "uri" />
<field id = "content" type = "node" />
</interface>
<script type = "text/brightscript" >
<![CDATA[
sub init()
m.top.functionName = "getContent"
end sub
sub getContent()
content = createObject("roSGNode", "ContentNode")
contentxml = createObject("roXMLElement")
readInternet = createObject("roUrlTransfer")
readInternet.setUrl(m.top.uri)
contentxml.parse(readInternet.GetToString())
if contentxml.getName() = "listcontent"
for each item in contentxml.GetNamedElements("item")
attributes = item.getAttributes()
item = {
text: attributes.text
}
listitem = content.createChild("ContentNode")
listitem.title = item.text
end for
end if
m.top.content = content
end sub
]]>
</script>
</component>
BRIGHTSCRIPT: ERROR: roSGNode: Failed to create roSGNode with type getLabelListContent: pkg:/components/screens/DetailsScreen/DetailsScreen.brs(101)
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
Suspending threads...
Thread selected: 1* ...ailsScreen/DetailsScreen.brs(102) m.getHomeOptionsList.setField("uri", "http://www.sdktestingl
Current Function:
100: sub runXMLTask()
101: m.getHomeOptionsList = createObject("roSGNode", "getLabelListContent")
102:* m.getHomeOptionsList.setField("uri", "http://www.sdktestinglab.com/homeoptionslistcontent.xml")
103: m.getHomeOptionsList.observeField("content", "showhomeoptionslist")
104: m.getHomeOptionsList.functionName = "showhomeoptionslist"
105: m.getHomeOptionsList.control = "RUN"
106: end sub
Interface not a member of BrightScript Component (runtime error &hf3) in [color=#0080e1][u]pkg:/components/screens/DetailsScreen/DetailsScreen.brs(102)
102: m.getHomeOptionsList.setField("uri", "http://www.sdktestinglab.com/homeoptionslistcontent.xml")
Sets the value of the subject node field identified by fieldName to value. This will fail and stop script execution if the value is not of the appropriate type. Returns true if the field is successfully set, false otherwise.
<interface>
<field id = "uri" type = "string" />
<field id = "content" type = "node" />
</interface>
101: m.getHomeOptionsList = createObject("roSGNode", "getLabelListContent")
m.getHomeOptionsList.setField("uri", "http://www.sdktestinglab.com/homeoptionslistcontent.xml")
103: m.getHomeOptionsList.observeField("content", "showhomeoptionslist")
104: m.getHomeOptionsList.functionName = "showhomeoptionslist"
105: m.getHomeOptionsList.control = "RUN"
106: end sub
Interface not a member of BrightScript Component (runtime error &hf3)
m.getHomeOptionsList = createObject("roSGNode", "getLabelListContent")
? "DID THIS WORK???", m.getHomeOptionsList
I am also having same problem in my code can you please help me