From c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Mon, 1 May 2006 11:47:04 +0000 Subject: simplify GUIcreate/createWidget, fix base class order --- lib/python/Components/VariableText.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'lib/python/Components/VariableText.py') diff --git a/lib/python/Components/VariableText.py b/lib/python/Components/VariableText.py index e2a755c5..bb8b5fe3 100644 --- a/lib/python/Components/VariableText.py +++ b/lib/python/Components/VariableText.py @@ -1,9 +1,10 @@ import skin -class VariableText: +class VariableText(object): """VariableText can be used for components which have a variable text, based on any widget with setText call""" def __init__(self): + object.__init__(self) self.message = "" self.instance = None @@ -19,14 +20,7 @@ class VariableText: def getText(self): return self.message - def GUIcreate(self, parent): - self.instance = self.createWidget(parent) - self.instance.setText(self.message) + text = property(getText, setText) - def GUIdelete(self): - self.removeWidget(self.instance) - self.instance = None - - def removeWidget(self, instance): - pass - + def postWidgetCreate(self, instance): + instance.setText(self.message) -- cgit v1.2.3