fix setText("")
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 8 Jun 2006 10:34:10 +0000 (10:34 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Thu, 8 Jun 2006 10:34:10 +0000 (10:34 +0000)
lib/python/Components/Input.py

index 311e42a95fc62a31ae16698ec4851776c53ccb1b..4242611403c6294a845f42e68e9319f1efbcd1c7 100644 (file)
@@ -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