How from a list to call a function when user clicks on it
#1
I would appreciate any help with the plugin that I am working on. I have read and looked at number of examples but cannot figure it out.

I have managed to create a list and that gets displayed in a window what I want then is if a user clicks on one of the list items to call a function. I have gone right to basics. This is the basic code but it doesn't work here as well here as soon as a click I am prompted with the dialog box then it takes me to a list I was hopping that when I click on one of the items on the list it will prompt me with dialog box


elif page == "test":
ok = getStreams1(url)
xbmcgui.Dialog().ok(__addonname__, line1, line2, line3)
setView('files', 500)
xbmcplugin.endOfDirectory(int(sys.argv[1]))

Any help is appreciated
Reply
#2
denz,

Are you using the xbmcplugin.addDirectoryItem function? This function takes a url as a parameter. If you compose the url so that the url points back to your plugin, your plugin will be called again. You add parameters to the url and then you can parse the parameters the second time your plugin gets called.
Reply
#3
Thank you so much for that I have found an example on wiki and it is working on basic things I have tried. I will try over the weekend to integrate it in add on
Reply

Logout Mark Read Team Forum Stats Members Help
How from a list to call a function when user clicks on it0