2018-01-09, 22:32
Hi
i want in a service script listen to action events (specifically to keyboard events onscreen keyboard and real) of a Window i get with
window = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
i tried to override the function onAction on the instance with
window.onAction = types.MethodType(myonAction, window)
but failed with Error Contents: 'xbmcgui.Window' object attribute 'onAction' is read-only
(Im not so fit with python, 15years with java)
I also checked the monitor class but couldnt really find something.
Is there a way to hook for a listener somewhere for actions?
I figured i could extend window override onaction and assign all contents of the original to my new instance and call all methods of the original in my version . Hide the original show my version but that seems to be a bit overblown to just add a listener.
I could also continuesly read the text of the editbox control in a loop but that feels quite like a bad thing to do.
Any advice?
Thanks
Benni
i want in a service script listen to action events (specifically to keyboard events onscreen keyboard and real) of a Window i get with
window = xbmcgui.Window(xbmcgui.getCurrentWindowDialogId())
i tried to override the function onAction on the instance with
window.onAction = types.MethodType(myonAction, window)
but failed with Error Contents: 'xbmcgui.Window' object attribute 'onAction' is read-only
(Im not so fit with python, 15years with java)
I also checked the monitor class but couldnt really find something.
Is there a way to hook for a listener somewhere for actions?
I figured i could extend window override onaction and assign all contents of the original to my new instance and call all methods of the original in my version . Hide the original show my version but that seems to be a bit overblown to just add a listener.
I could also continuesly read the text of the editbox control in a loop but that feels quite like a bad thing to do.
Any advice?
Thanks
Benni