From 394e2b2e2488ae3fa5edc6a9a512bcf0414cc562 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Thu, 8 Jun 2006 10:34:10 +0000 Subject: [PATCH] fix setText("") --- lib/python/Components/Input.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/python/Components/Input.py b/lib/python/Components/Input.py index 311e42a9..42426114 100644 --- a/lib/python/Components/Input.py +++ b/lib/python/Components/Input.py @@ -26,8 +26,15 @@ class Input(VariableText, HTMLComponent, GUIComponent): text = self.text if self.type == self.PIN: text = "*" * len(self.text) - self.setText(text) - #self.setText(self.text[0:self.currPos] + "_" + self.text[self.currPos] + "_" + self.text[self.currPos + 1:]) + self.message = text + if self.instance: + self.instance.setText(self.message) + + def setText(self, text): + if not len(text): + self.currPos = 0 + self.text = text + self.update() def getText(self): return self.text -- 2.30.2