diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-05-01 11:47:04 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-05-01 11:47:04 +0000 |
| commit | c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3 (patch) | |
| tree | 22d7ac7e4f0aaf3b91574d81ac30fd6a9d97fdb7 /lib/python/Components/VariableValue.py | |
| parent | 9c5ae5bc6ef248b414e3153538936477cccfdd20 (diff) | |
| download | enigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.tar.gz enigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.zip | |
simplify GUIcreate/createWidget, fix base class order
Diffstat (limited to 'lib/python/Components/VariableValue.py')
| -rw-r--r-- | lib/python/Components/VariableValue.py | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/lib/python/Components/VariableValue.py b/lib/python/Components/VariableValue.py index 8f0cef4c..288de01a 100644 --- a/lib/python/Components/VariableValue.py +++ b/lib/python/Components/VariableValue.py @@ -1,27 +1,22 @@ import skin -class VariableValue: +class VariableValue(object): """VariableValue can be used for components which have a variable value (like eSlider), based on any widget with setValue call""" def __init__(self): - self.value = 0 - self.instance = None - + self.__value = 0 + def setValue(self, value): - self.value = value + self.__value = value if self.instance: - self.instance.setValue(self.value) + self.instance.setValue(self.__value) def getValue(self): - return self.value - - def GUIcreate(self, parent): - self.instance = self.createWidget(parent) - self.instance.setValue(self.value) - - def GUIdelete(self): - self.removeWidget(self.instance) - self.instance = None - - def removeWidget(self, instance): - pass + return self.__value + + def postWidgetCreate(self, instance): + print self + print self.GUI_WIDGET + self.instance.setValue(self.__value) + + value = property(getValue, setValue) |
