"jbrave" wrote:
I was thinking something like this:
return {TrackInfo:Trackobj,PosterItms:PosterObj,songURls:SongObj} 'roAssociativeArray
This is fine (though you might consider a bit more whitespace
🙂 ).
"jbrave" wrote:
which would be returned to a function called from a loop:
dataobject=CreateObject("RoArray",1,true)[/color] [color=#BF0000]'should this be an RoArray or an RoAssociativeArray?
for each blah in xmltracklist
dataobject.push(getTracks(blah))
next
This is pretty close, though the first line can be much simplified:
dataobject = []
"jbrave" wrote:
now how do I access the particular items from dataobject?
posterscreen.setContentList(dataobject.Posteritms)
Would that be the correct syntax?
Close. Remember that dataobject is an
array of associative arrays, so you have to pick an element:
posterscreen.setContentList(dataobject[current_track].Posteritms)
The variable name 'dataobject' is a bit confusing in this case. Perhaps 'track_info'?