|
|
@ -350,9 +350,14 @@ function InputText:init()
|
|
|
|
end
|
|
|
|
end
|
|
|
|
-- Beware other cases where implicit conversion to text may be done
|
|
|
|
-- Beware other cases where implicit conversion to text may be done
|
|
|
|
-- at some point, but checkTextEditability() would say "not editable".
|
|
|
|
-- at some point, but checkTextEditability() would say "not editable".
|
|
|
|
if self.input_type == "number" and type(self.text) == "number" then
|
|
|
|
if self.input_type == "number" then
|
|
|
|
-- checkTextEditability() fails if self.text stays not a string
|
|
|
|
if type(self.text) == "number" then
|
|
|
|
self.text = tostring(self.text)
|
|
|
|
-- checkTextEditability() fails if self.text stays not a string
|
|
|
|
|
|
|
|
self.text = tostring(self.text)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
if type(self.hint) == "number" then
|
|
|
|
|
|
|
|
self.hint = tostring(self.hint)
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
self:initTextBox(self.text)
|
|
|
|
self:initTextBox(self.text)
|
|
|
|
self:checkTextEditability()
|
|
|
|
self:checkTextEditability()
|
|
|
|