Object type and settings to use for toggling options?
I am generating a list of TVShowObjects to display. At the very top of the list, I want to add a "Sort Toggle" item that, when selecting, will cycle through various options for sorting the list of shows. It seemed like a DirectoryObject was the closest thing to what I needed. However, when I select the directory object, the client treats this like a stack where the previous sort label is the title, and where hitting "back" takes you back to the previous sort. (Which I guess makes sense if you treat this like a file directory.) A visible effect of this is that the title of the object is then displayed as the heading of the new page, which means it shows the old sort method...
It seems to me however that either the "no_history" or "replace_parent" flag in the ObjectContainer should override this behavior, but I am noticing no difference when I set either of those (or both of them) to True. I've also tried "mixed_parents", also to no effect...
Is there any Object I can use that will keep my navigation on the "same level" of the stack?
Here is my code:
def DisplayEpisodesData(episode_list): oc = ObjectContainer( title1="TVMonitor", no_history=True, # I've tried all 3 of these by themselves and in combination, no noticable difference... replace_parent=True, mixed_parents=True) oc.add(DirectoryObject( key = Callback(ChangeSort), title = "Sorted %s (Change)" % (cur_sort))) # all my shows are added down here... return oc @route(PREFIX + '/changesort') def ChangeSort(): global cur_sort cur_sort = SortOrder.next() Log("Changed to "+cur_sort) return MainMenu()