Do you mean documentation as an instruction file in /doc? If so, that will come when the code is more stable. I don't want to keep rewriting the documentation as the test results come in.
No, I mean python doc string. Unfortunately enigma2 completely miss doc strings.
See:
https://www.python.o...-is-a-docstringFor the users the big change will be that when they are asked to enter a hex value they can now only be shown valid hex characters on the UI.
Something like this was doing the "hex" job (the old times...).
class HexKeyBoard(VirtualKeyBoard):
def __init__(self, session, title="", **kwargs):
VirtualKeyBoard.__init__(self, session, title, **kwargs)
self.skinName = "VirtualKeyBoard"
self.keys_list = [[u"EXIT", u"1", u"2", u"3", u"4", u"5", u"6", u"7", u"8", u"9", u"0", u"BACKSPACE"],
[u"OK", u"A", u"B", u"C", u"D", u"E", u"F", u"OK", u"LEFT", u"RIGHT", u"ALL", u"CLEAR"]]
self.shiftkeys_list = []
self.keyImages = { "BACKSPACE": self.key_backspace, "ALL": self.key_all, "EXIT": self.key_esc,
"OK": self.key_ok, "LEFT": self.key_left, "RIGHT": self.key_right, "CLEAR": self.key_clr }
self.nextLang = None
self.lang = None
self["country"] = Label()
def setHexCallback(session, hex):
print "hex:", hex
def hexmenu(session, service=None, *args, **kwargs):
session.openWithCallback(boundFunction(setHexCallback, session), HexKeyBoard,
title=_("Please enter new hex:"), text="", maxSize=20, visible_width=20)
def Plugins(**kwargs):
return [PluginDescriptor(name = "Test" , description = "Test", icon="plugin.png",
where = [PluginDescriptor.WHERE_EXTENSIONSMENU, PluginDescriptor.WHERE_PLUGINMENU],
fnc = hexmenu, needsRestart = False)]
Now, i really don't know if above still works, or how easy is to get a hex input with keyboard without making custom screens.
On the other hand, an example would be nice.
The extra strings are to make it easier on developers to remember the mode names. If you are suggesting that I went a bit overboard then I will agree and offer to remove some of the duplicate options. If I am to remove the duplicates I will be removing the "_" versions as most of the code uses CamelCase variable names.
Keep only what they need to remember, more options means more things to remember, so get rid of duplicates.
Some editors don't co-operate with UTF-* data. I have seen minor errors creep into UTF-8 files because someone used an editor that corrupted the data. By using unicode this risk is totally eliminated.
What editor today doesn't properly handle unicode?
Uninstall it and use one that makes your like simpler!
Wavefield T90: 0.8W - 1.9E - 4.8E - 13E - 16E - 19.2E - 23.5E - 26E - 33E - 39E - 42E - 45E on EMP Centauri DiseqC 16/1
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916