Bug xbmcgui.Dialog.input
#1
Small bug with the keyword "default". It's actually coded as "defaultt": https://github.com/xbmc/xbmc/blob/346c37...log.h#L535

Code:
input(heading[, default, type, option, autoclose])--Show an Input dialog.

heading : string - dialog heading.
default : [opt] string - default value. (default=empty string)
type : [opt] integer - the type of keyboard dialog. (default=xbmcgui.INPUT_ALPHANUM)
option : [opt] integer - option for the dialog. (see Options below)
autoclose : [opt] integer - milliseconds to autoclose dialog. (default=do not autoclose)

Types:
    - xbmcgui.INPUT_ALPHANUM (standard keyboard)
    - xbmcgui.INPUT_NUMERIC (format: #)
    - xbmcgui.INPUT_DATE (format: DD/MM/YYYY)
    - xbmcgui.INPUT_TIME (format: HH:MM)
    - xbmcgui.INPUT_IPADDRESS (format: #.#.#.#)
    - xbmcgui.INPUT_PASSWORD (return md5 hash of input, input is masked)


Options PasswordDialog :

    - xbmcgui.PASSWORD_VERIFY (verifies an existing (default) md5 hashed password)
Options AlphanumDialog :

    - xbmcgui.ALPHANUM_HIDE_INPUT (masks input)
*Note, Returns the entered data as a string.
Returns an empty string if dialog was canceled.

example:
    - dialog = xbmcgui.Dialog()
    - d = dialog.input('Enter secret code', type=xbmcgui.INPUT_ALPHANUM, option=xbmcgui.ALPHANUM_HIDE_INPUT)n
Reply
#2
it looks odd, but since it's being used consistently, i don't think it's a bug.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
Well then the api doc needs to be corrected. I use keywords and it throws errors that the "default" keyword doesn't exists. It works fine if I refer to "defaultt" instead. Maybe it's not a bug, but it's certainly a typo and I had to dig into the Kodi code to figure out the documentation is wrong. Just thought I'd mention this small discrepancy. Wink


Sent from my iPhone
Reply
#4
yup, i see you're right.

we either need to change the docs or change the code.
i'd need to check if any addons in our repo are actually using 'defaultt', in order not to break them in case we opt for changing the code.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#5
fixed the docs: https://github.com/xbmc/xbmc/pull/10511

most likely 'default' is a reserved name in c++ and can't be used as the name of a variable, hence 'defaultt' was used.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#6
Sounds good! Thanks @ronie for updating docs


Sent from my iPhone
Reply

Logout Mark Read Team Forum Stats Members Help
xbmcgui.Dialog.input0