Getting the current selection
#4
I'd like to bump this thread as I have the same question. As part of the SageTV video addon (source below), I do create listitems via python, but using the couple lines below, I am unable to get the currently selected item (cursel is None).

Code:
win = xbmcgui.Window(xbmcgui.getCurrentWindowId())
curctl = win.getFocus()
cursel = curctl.getSelectedItem()

Addon source: https://github.com/kricker/plugin.video....its/master

Any thoughts on how to do this? The win.getFocus() does return a controllist... is there a workaround perhaps where I can loop through the items in that and check a property somehow to see which listitem is selected? Other thoughts?
Reply


Messages In This Thread
Getting the current selection - by jhsrennie - 2012-07-02, 16:53
RE: Getting the current selection - by pieh - 2012-07-03, 10:30
RE: Getting the current selection - by LehighBri - 2012-09-21, 14:20
RE: Getting the current selection - by ronie - 2012-09-21, 20:17
RE: Getting the current selection - by ronie - 2012-09-21, 23:19
RE: Getting the current selection - by Popeye - 2012-11-27, 23:10
RE: Getting the current selection - by belese - 2013-10-10, 16:04
RE: Getting the current selection - by tim619 - 2015-11-07, 02:18
RE: Getting the current selection - by Torben - 2016-04-02, 15:14


Logout Mark Read Team Forum Stats Members Help
Getting the current selection0
This forum uses Lukasz Tkacz MyBB addons.