| Issue 228: | Allow more than one virtual keyboard at a time without setting the "group" keyword argument | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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
May 25, 2010
merged
Status:
Done
Jul 2, 2010
(No comment was entered for this change.)
Labels:
Milestone-0.5
|
Owner: txprog
Labels: Component-Core Milestone-0.4.1