Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
SoutheastTv
Visitor

Re: How to get instant updates to Roku?

Found it:


'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in .../pkg:/source/categoryFeed.brs(16)

016: conn.UrlCategoryFeed = conn.UrlPrefix + "/categories.php?ts=" + dt.AsSeconds().ToStr()
Backtrace:


Dude! This Debugger is awesome!!! OMG, what a life saver, I can test things now so much easier. I didn't know this was around. The problem was that I was using the dt.AsSeconds which I copied from dude's code, but I didn't add the part assigning it to the object, so dt wasn't assigned.
0 Kudos
gonzotek
Visitor

Re: How to get instant updates to Roku?

"SoutheastTv" wrote:
Found it:


'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in .../pkg:/source/categoryFeed.brs(16)

016: conn.UrlCategoryFeed = conn.UrlPrefix + "/categories.php?ts=" + dt.AsSeconds().ToStr()
Backtrace:


Dude! This Debugger is awesome!!! OMG, what a life saver, I can test things now so much easier. I didn't know this was around. The problem was that I was using the dt.AsSeconds which I copied from dude's code, but I didn't add the part assigning it to the object, so dt wasn't assigned.
Glad you found it(the error)! The debugger's a BIG help.
Remoku.tv - A free web app for Roku Remote Control!
Want to control your Roku from nearly any phone, computer or tablet? Get started at http://help.remoku.tv
by Apps4TV - Applications for television and beyond: http://www.apps4tv.com
0 Kudos
SoutheastTv
Visitor

Re: How to get instant updates to Roku?

Here is the problem I'm at now:

Escape character is '^]'.
ategory" then
Backtrace:
Function load_category_feed(conn As <uninitialized>) As
file/line: /tmp/plugin/DEAAAAKv3.../pkg:/source/categoryFeed.brs(86)
Function initcategorylist() As
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appHomeScreen.brs(111)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appHomeScreen.brs(39)
Function main() As
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appMain.brs(20)

Local Variables:
conn &h0010 bsc:roAssociativeArray, refcnt=4
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=4
http &h0010 bsc:roAssociativeArray, refcnt=1
rsp &h8010 bsc:roString (2.1 was String), refcnt=1
xml &h0010 bsc:roXMLElement, refcnt=1
topnode &h0000 <uninitialized> val:Uninitialized
categories &h0000 <uninitialized> val:Uninitialized
e &h0000 <uninitialized> val:Uninitialized
o &h0000 <uninitialized> val:Uninitialized
BrightScript Debugger> ------ Running ------
created feed connection for http://scclib.com/demo/roku/categories.php?ts=1330111172
url: http://scclib.com/demo/roku/categories.php?ts=1330111172
Took: 92ms
Parse Took: 1ms
Current Function:
057: Function load_category_feed(conn As Object) As Dynamic
058:
059: http = NewHttp(conn.UrlCategoryFeed)
060:
061: Dbg("url: ", http.Http.GetUrl())
062:
063: m.Timer.Mark()
064: rsp = http.GetToStringWithRetry()
065: Dbg("Took: ", m.Timer)
066:
067: m.Timer.Mark()
068: xml=CreateObject("roXMLElement")
069: if not xml.Parse(rsp) then
070: print "Can't parse feed"
071: return invalid
072: endif
073: Dbg("Parse Took: ", m.Timer)
074:
075: m.Timer.Mark()
076: if xml.category = invalid then
077: print "no categories tag"
078: return invalid
079: endif
080:
081: if islist(xml.category) = false then
082: print "invalid feed body"
083: return invalid
084: endif
085:
086: if xml.category[0].GetName() <> "category" then
087: print "no initial category tag"
088: return invalid
089: endif
090:
091: topNode = MakeEmptyCatNode()
092: topNode.Title = "root"
093: topNode.isapphome = true
094:
095: print "begin category node parsing"
096:
097: categories = xml.GetChildElements()
098: print "number of categories: " + itostr(categories.Count())
099: for each e in categories
100: o = ParseCategoryNode(e)
101: if o <> invalid then
102: topNode.AddKid(o)
103: print "added new child node"
104: else
105: print "parse returned no child node"
106: endif
107: next
108: Dbg("Traversing: ", m.Timer)
109:
110: return topNode
111:
112: End Function
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in .../pkg:/source/categoryFeed.brs(86)

086: if xml.category[0].GetName() <> "category" then
Backtrace:
Function load_category_feed(conn As <uninitialized>) As
file/line: /tmp/plugin/DEAAAAKv3.../pkg:/source/categoryFeed.brs(86)
Function initcategorylist() As
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appHomeScreen.brs(111)
Function showhomescreen(screen As ) As Integer
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appHomeScreen.brs(39)
Function main() As
file/line: /tmp/plugin/DEAAAAKv309F/pkg:/source/appMain.brs(20)

Local Variables:
conn &h0010 bsc:roAssociativeArray, refcnt=4
global &h0020 rotINTERFACE:ifGlobal
m &h0010 bsc:roAssociativeArray, refcnt=4
http &h0010 bsc:roAssociativeArray, refcnt=1
rsp &h8010 bsc:roString (2.1 was String), refcnt=1
xml &h0010 bsc:roXMLElement, refcnt=1
topnode &h0000 <uninitialized> val:Uninitialized
categories &h0000 <uninitialized> val:Uninitialized
e &h0000 <uninitialized> val:Uninitialized
o &h0000 <uninitialized> val:Uninitialized
0 Kudos
SoutheastTv
Visitor

Re: How to get instant updates to Roku?

I've connected it directly to the categories.xml and it appears to be working fine and updating. Thanks guys. I'll be good from here on out I think, I've got more of a handle on it and connection to the debug program really helped.
0 Kudos