2022-07-03, 11:30
I have some code where I am prompting the user to input a server IP address and port number. I am using the same code for Kodi 18.4 and 19. I am seeing the same issue with both versions when I prompt the user for the server port number the IP address appears as the default / prepopulated value even though I am declaring a default value.
ipdialog = xbmcgui.Dialog()
serverip = ipdialog.input(addon.getLocalizedString(30448), type=xbmcgui.INPUT_IPADDRESS)
portdialog = xbmcgui.Dialog()
serverport = portdialog.input(addon.getLocalizedString(30449), '53168', type=xbmcgui.INPUT_NUMERIC)
When the portdialog box comes up if I delete a character in the IP address the default port value appears as '5316' minus the last character, 8. I've tried adding a "del ipdialog" line before the port dialog line. I've tried reusing ipdialog as "serverport = ipdialog.input(addon.getLocalizedString(30449), '53168', type=xbmcgui.INPUT_NUMERIC)" instead of portdialog and I get the same results.
Is this a bug in Kodi or am I doing something wrong? If this is a bug, does anyone have a workaround ?
Thanks,
Jeff
ipdialog = xbmcgui.Dialog()
serverip = ipdialog.input(addon.getLocalizedString(30448), type=xbmcgui.INPUT_IPADDRESS)
portdialog = xbmcgui.Dialog()
serverport = portdialog.input(addon.getLocalizedString(30449), '53168', type=xbmcgui.INPUT_NUMERIC)
When the portdialog box comes up if I delete a character in the IP address the default port value appears as '5316' minus the last character, 8. I've tried adding a "del ipdialog" line before the port dialog line. I've tried reusing ipdialog as "serverport = ipdialog.input(addon.getLocalizedString(30449), '53168', type=xbmcgui.INPUT_NUMERIC)" instead of portdialog and I get the same results.
Is this a bug in Kodi or am I doing something wrong? If this is a bug, does anyone have a workaround ?
Thanks,
Jeff