Posts: 182
Joined: Sep 2016
Reputation:
16
SEIKT
Senior Member
Posts: 182
2021-05-22, 06:56
(This post was last modified: 2021-05-22, 09:10 by SEIKT.)
Attempting to get the control of a radio button via getFocus() when a button is pressed triggered by the onAction function. The object of an individual radio button (xbmcgui.ControlRadioButton object at 0x0000025E4F076780) seems to be always changing when calling getFocus.
The getFocusId() function works as it did in Kodi 18, providing the same control ID no matter how many times it's called on the same button.
Posts: 7,302
Joined: May 2011
Reputation:
402
2021-05-22, 08:02
(This post was last modified: 2021-05-22, 08:05 by Lunatixz.)
That's a memory address not a control id. I can't speculate on why you see this value over the control Id until code is provided.
Posts: 103
Joined: Feb 2015
Reputation:
5
V8MEM
Senior Member
Posts: 103
2021-05-22, 13:42
(This post was last modified: 2021-05-22, 13:49 by V8MEM.)
you would need to use a debugger to check the threads, but there are many of these python bugs like the strptime bug that has been in kodi for 10 years. something to do with CAPI modules and the python init process.
Posts: 182
Joined: Sep 2016
Reputation:
16
SEIKT
Senior Member
Posts: 182
Thanks for your help fellas, I think someone made changes to controls in Matrix as they longer accept floats, they must be integers only. They may have created a bug. Anyway, I'll use control ID's instead, not sure why I preferred controls over ID's, the only thing that comes to mind is speed as getting the control ID from a control adds an extra step. Hopefully the transition to control ID's doesn't cause me any issues.
Posts: 1,699
Joined: Jun 2011
Reputation:
126
Yes controls comparison was broken in Matrix. You should compare their IDs.