Posts: 4
Joined: Mar 2013
Reputation:
0
I notice that in the xbmcgui module ListControl does not have a removeItem() method. Is there a reason why it doesn't?
Posts: 1,299
Joined: Jul 2009
Reputation:
59
sphere
Retired Team-Kodi Member
Posts: 1,299
Just to be sure: You noticed that it has a reset()-method to clear all items?
Posts: 4
Joined: Mar 2013
Reputation:
0
Yep. I have a list that I need to update periodically, say modify some of the items, remove some others etc. Resetting and refilling causes the list to scroll to the top, then selectItem() scrolls the list so that the selected item is in the last visible line - both not very comfortable.
Posts: 1,299
Joined: Jul 2009
Reputation:
59
sphere
Retired Team-Kodi Member
Posts: 1,299
In an add-on of type script I guess?
I am not sure if it will break anything, but you could also try to use "window_instance.removeControl(window_instance.getControl(ID))".
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
i thought there was a removeItem(), maybe it didn't get ported over with the swig change.
Posts: 4
Joined: Mar 2013
Reputation:
0
It looks like there wasn't, so I submitted a patch to the repo.