Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-12919] Android: Setting textfield's value to non-string crashes app

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-19T23:04:38.000+0000
Affected Version/sRelease 2.1.4, Release 3.0.2
Fix Version/sRelease 3.1.0, 2013 Sprint 06 API, 2013 Sprint 06
ComponentsAndroid
Labelsqe-testadded
ReporterTim Poulsen
AssigneeVishal Duggal
Created2013-03-01T13:11:30.000+0000
Updated2014-12-17T16:03:04.000+0000

Description

Programmatically setting the value of a text field to a non-string value crashes the app on Android. You get a force-close message and a Java dump that does not indicate the nature of the problem. Explicitly casting the value as a string before setting it eliminates the problem. Expected results: non-string data types should be converted to strings internally, matching JavaScript's typical auto-casting behavior. This is what happens on iOS. To reproduce, unzip the attached file. Drop its app folder into a new Alloy project. Build for the Android emulator or device. Click the button.

Attachments

FileDateSize
app.zip2013-03-01T13:11:30.000+00005765877

Comments

  1. Vishal Duggal 2013-03-19

    Pull pending https://github.com/appcelerator/titanium_mobile/pull/3987
  2. Shyam Bhadauria 2013-03-21

    Environment used for verification - Titanium SDK: 3.1.0.v20130320190115 Titanium  Studio:3.0.2.201302151605 Device: LG-P970 Android 2.2.2

JSON Source