Forum Discussion
haamro
8 years agoVisitor
Thank you. Sorry I think I need more help here. Here is my code.
getContent() is in task, and I still don't get it why .getString() is not there. Also not sure where is "roURLtransferTask " object from on your code. Sorry I am a noob 🙂
Task.xml
scenegraph.brs
getContent() is in task, and I still don't get it why .getString() is not there. Also not sure where is "roURLtransferTask " object from on your code. Sorry I am a noob 🙂
Task.xml
<?xml version="1.0" encoding="utf-8" ?>
<component name = "postergridCR" extends = "Task" >
<interface>
<field id = "postergriduri" type = "string" />
<field id = "postergridcontent" type = "string"/>
<field id = "content" type = "string" />
</interface>
<script type = "text/brightscript" >
<![CDATA[
sub init()
m.top.functionName = "getData"
end sub
sub getContent()
m.readInternet = createObject("roUrlTransfer")
m.readInternet.observeField("content","contentSet")
m.readInternet.Url = m.top.postergriduri
end sub
sub contentSet()
m.top.postergridcontent = m.readInternet.content
end sub
]]>
</script>
</component>
scenegraph.brs
getwebcontent ("http://example.com")
function getwebcontent(webpage as string)
m.myObj = createObject("RoSGNode", "postergridCR")
m.myObj.postergriduri=webpage
m.myObj.functionName="getcontent"
m.myObj.control = "RUN"
return m.myObj.postergridcontent
end function