Your Digital Media Has Never Looked So Good

Topic Author
Posts: 1
Joined: Tue Oct 18, 2016 9:33 am

Category Leaf Ordering

Tue Oct 18, 2016 9:45 am

I'm creating a channel based on the VideoPlayer Sample Channel, is there a way to control the display order of the categoryLeaf elements? The order on screen does not match the order in my feed. 
Posts: 31
Joined: Tue Oct 25, 2016 11:48 am

Re: Category Leaf Ordering

Wed Apr 19, 2017 7:36 pm

did you ever get an answer to this or figure it out? i'd love to hear. 
Posts: 2585
Joined: Sat Dec 18, 2010 4:58 pm

Re: Category Leaf Ordering

Thu Apr 20, 2017 5:35 pm

You will probably need to specify if it is the old SDK or the new Scenegraph version you're working with.  I think I read somewhere that if it's an associative array then the order will be randomized, so you'd need to sort them first?  But I don't remember exactly. ... ve#p556208

If you want them in a different order you should be able to add them individually to a new array before displaying to the screen - rather than using for each you can use a regular for loop -
Something like this -- note - this might not be exactly what you need, just off the top of my head

For i=0 to x
Posts: 2
Joined: Wed Aug 09, 2017 11:42 am

Re: Category Leaf Ordering

Wed Aug 09, 2017 11:47 am

Ditto, same issue... did you ever find a solution for this??! I haven't come up with one yet. Thanks!
Posts: 2
Joined: Wed Aug 09, 2017 11:42 am

Re: Category Leaf Ordering

Thu Oct 05, 2017 1:56 pm

This is for the new SDK kit using Scene Graph and the new "Video Player" sample channel. 
I have tried using the .keys() trick to return a keyed associative array, but I haven't figured out how to properly implement that into the UriHandler.brs file. 
I have everything else finished and ready to go so that I can update our channel to run on the new Scene Graph platform, but still have to get this figured out!
I'm sure it is just a couple lines of code, but I can't figure it out. I'm not sure why they didn't put in sample code so those of us who want our category leafs added to the RowList in the same order as our XML files could easily do that! The previous SDK worked this way, but obviously it was very different.

Any help would be greatly appreciated!!

Who is online

Users browsing this forum: No registered users and 6 guests