When only one CheckBox is selected cb.current() throws an Error, because self.get() returns the selected value as a String and not as array.
To solve this self.get() needs to be checked if is String and converted to array.
Here: (in method current)
retarr = self.get()
if type(retarr) == str: retarr = [retarr] # EDIT BY DABVIT
if len(retarr) == 0:
return -1
elif len(retarr) == 1:
if retarr[0] == '':
return -1
else:
return self.cget('values').index(retarr[0])
else:
return [self.cget('values').index(i) for i in retarr] # EDIT BY DABVIT
When only one CheckBox is selected cb.current() throws an Error, because self.get() returns the selected value as a String and not as array.
To solve this self.get() needs to be checked if is String and converted to array.
Here: (in method current)