Skip to content

Commit

Permalink
Merge pull request #7 from BMJHayward/compat_text
Browse files Browse the repository at this point in the history
Use compatibility layer for Py2/Py3.
  • Loading branch information
freakboy3742 committed Oct 15, 2015
2 parents 67f2b9f + 005d90b commit 70e0126
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion toga_gtk/widgets/textinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

from .base import Widget

from toga import compat


class TextInput(Widget):
def __init__(self, initial=None, placeholder=None, readonly=False):
Expand Down Expand Up @@ -35,4 +37,4 @@ def value(self):

@value.setter
def value(self, value):
self._impl.set_text(unicode(value))
self._impl.set_text(compat.text(value))

0 comments on commit 70e0126

Please sign in to comment.