I have a TargetList that works great. The only issue I am seeing is when I need to refresh the content of that TargetList.
Bellow is how I am updating the content. Here is the use case that I am seeing. Our list is ordered from most recently played to least recently played. Let's say I have 4 titles in the list. I have a timer that runs every 30 seconds to pull the list of titles from our web service and update the TargetList. The user now plays the 4th title in the list. When they come back to the screen with the TargetList on it it has refreshed but the UI is showing that title twice in the target list. It does not appear to refresh properly. It might have to do with some of the tiles being outside of the focus set but I can't be sure.
Is there a proper way to update the content of a TargetList / TargetGroup ?
based on my experience with other components, I think the best approach will be to loop over each element and update their component contents individually. In other words, overwrite values for "text" and "uri" fields rather than trying to overwrite the whole content in one shot. Alternatively, create a new targetlist from your new content and replace your initial targetlist (get / set your focus along the way) hope it may help, Joe
Well, that is something I can try. I also noticed that the items do update if they move outside the targetset and come back in. Strange right?
Though this suggestion is kind of a pain. You have to update existing items or remove them if the new list is smaller than the currently displayed list. Or append them if there are more. It should just work by updating the targetlist.content.
yes - you need to remove extra elements or createObject for additional ones. Yes it is a pain, so was figuring it out by trial and error! Hey man, I didn't write this firmware, just trying to help Maybe try my 2nd suggestion, instantiate a new object with your new content and replace the existing?
Not sure whether there's a way to override that, I haven't worked much with the "Target" components. As far as the screen flashing I believe there was a workaround to fade out the container and fade it back in after the child component replacement. Don't hold me to it