Button click event
#1
Question 
Hi,
I'm building a little script example where a simple button should launch a click event. Following the tutorial steps I saw the function onControl is supposed to be called whenever a mouse or keyboard event is caught, but it seems not to work in the version I have installed. Nothing happens when the button is clicked. Here is my code:

http://pastebin.com/yk8nw0VT

Why didn't it work?

Thanks in advance.
Reply
#2
I think you need to change the following code:

Code:
    def onControl(self, control):
        dialog = xbmcgui.Dialog()
        dialog.ok('ex ' + action.getId(), 'ex')

to

Code:
    def onClick(self, control):
        dialog = xbmcgui.Dialog()
        dialog.ok('ex ' + control, 'ex')
Reply

Logout Mark Read Team Forum Stats Members Help
Button click event0