Forum Discussion
onevoisses
13 years agoVisitor
here is the array
here is the json
this is what I get when i used the print statement
------ Running ------
SpringBoardButton Pressed: 5 index: 1
<uninitialized>
1
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
'
'
Array operation attempted on variable not DIM'd. (runtime error &he7) in ...kg:/source/AppSpringboard.brs(40)
040: print videos[msg.getindex()]
Backtrace:
I had 20 in the array but 21 videos so I move it to 25
also print videos.count() gives the following error
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in ...kg:/source/AppSpringboard.brs(40)
040: print videos.count();
do you think my problem is
Function ShowPosterScreen(videos as object) as integer
posterScreen = CreateObject("roPosterScreen")
port = CreateObject("roMessagePort")
posterScreen.SetMessagePort(port)
contentList = CreateObject("roArray",25, true)
for each video in videos
poster = CreateObject("roAssociativeArray")
poster.ShortDescriptionLine1 = video.Title
poster.SDPosterURL = video.Image
poster.HDPosterURL = video.Image
contentList.push( poster )
end for
posterScreen.SetContentList( contentList )
here is the json
Function LoadJSONFile() as void
jsonAsString = ReadAsciiFile("pkg:/json/sample1.json")
m.json = ParseJSON(jsonAsString)
ShowPosterScreen(m.json.Videos)
End Function
this is what I get when i used the print statement
------ Running ------
SpringBoardButton Pressed: 5 index: 1
<uninitialized>
1
BrightScript Micro Debugger.
Enter any BrightScript statement, debug commands, or HELP.
'
'
Array operation attempted on variable not DIM'd. (runtime error &he7) in ...kg:/source/AppSpringboard.brs(40)
040: print videos[msg.getindex()]
Backtrace:
I had 20 in the array but 21 videos so I move it to 25
also print videos.count() gives the following error
'Dot' Operator attempted with invalid BrightScript Component or interface reference. (runtime error &hec) in ...kg:/source/AppSpringboard.brs(40)
040: print videos.count();
do you think my problem is
ShowPosterScreen(m.json.Videos)