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: 
DavidAW
Visitor

SceneGraph Sample Broken?

Hi all,
I am just starting looking into Roku development. I looked at the sample video player, and then the new "Simple Grid And Video" example from the SceneGraph example here:

https://blog.roku.com/developer/2016/03 ... /#more-964

When I download this sample and run it though it does not work. It fails as shown below:

BrightScript Debugger> next
022: scene.gridContent = ParseXMLContent(list)

BrightScript Debugger> s
022: scene.gridContent = ParseXMLContent(list)

Current Function:
014: ContentList : oneRow
015: }
016: {
017: Title:"Second row"
018: ContentList : oneRow
019: }
020: ]
021:
022:* scene.gridContent = ParseXMLContent(list)
023:
024: while true
025: msg = wait(0, port)
026: print "------------------"
Invalid value for left-side of expression. (runtime error &he4) in pkg:/source/main.brs(22)
022: scene.gridContent = ParseXMLContent(list)
Backtrace:
#0 Function runuserinterface() As Void
file/line: pkg:/source/main.brs(24)
Local Variables:
global rotINTERFACE:ifGlobal
m roAssociativeArray refcnt=2 count:0
screen bsc:roSGScreen refcnt=1
scene Invalid
port bsc:roMessagePort refcnt=2
onerow roArray refcnt=3 count:15
list roArray refcnt=1 count:2
msg <uninitialized>

BrightScript Debugger>


The problem seems to be that the scene isn't valid.

screen = CreateObject("roSGScreen")
scene = screen.CreateScene("HomeScene")


The "HomeScene" is defined in a separate file. Maybe it needs to be imported or something? I am new to BrightScript.

Thanks for any help. This SceneGraph model seems cleaner than writing the whole app in one file.
0 Kudos
1 REPLY 1
RobSMS
Visitor

Re: SceneGraph Sample Broken?

If you are using Eclipse IDE, make sure that you have selected the components, images and source folders on export. Sometimes they don't get selected properly and the app crashes because the files were not included in the package.
Need Apps Templates? Content Management for OTT/IPTV? Check me out @ http://rovidx.com
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.