mansrz / pymt

Automatically exported from code.google.com/p/pymt
0 stars 0 forks source link

Allow more than one virtual keyboard at a time without setting the "group" keyword argument #228

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two or more MTTextInput objects without giving a "group" keyword
argument.
2. Each keyboard will disappear and be replaced by the last keyboard added.

What is the expected output? What do you see instead?

Each MTTextInput should have a separate keyboard by default.

What version of the product are you using? On what operating system?

Linux (Fedora 11) Git HEAD

Please provide any additional information below.

The static version of _group_id should be used.

diff --git a/pymt/ui/widgets/composed/textinput.py
b/pymt/ui/widgets/composed/textinput.py
index 6957bea..05ed185 100644
--- a/pymt/ui/widgets/composed/textinput.py
+++ b/pymt/ui/widgets/composed/textinput.py
@@ -41,17 +41,25 @@ class MTTextInput(MTButton):
         # initialize group on random if nothing is set
         self._groupname = kwargs.get('group')
         if self._groupname is None:
-            self._group_id += 1
-            self._groupname = 'uniqgroup%d' % self._group_id
+            MTTextInput._group_id += 1
+            self._groupname = 'uniqgroup%d' % MTTextInput._group_id
         # first time ? create the group
         if not self._groupname in self._group:
             self.group['keyboard'] = None

Original issue reported on code.google.com by jaybradl...@gmail.com on 7 Apr 2010 at 2:01

GoogleCodeExporter commented 9 years ago

Original comment by txprog on 7 Apr 2010 at 3:43

GoogleCodeExporter commented 9 years ago
merged

Original comment by txprog on 25 May 2010 at 3:55

GoogleCodeExporter commented 9 years ago

Original comment by txprog on 2 Jul 2010 at 2:17