[TIMOB-23191] iOS: Non-string PickerRow titles (integer,bool, ..) causing crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-04-11T22:54:30.000+0000 |
Affected Version/s | Release 5.2.2 |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | ios, picker, pickerrow, qe-5.4.0 |
Reporter | Kelly Corn |
Assignee | Hans Knöchel |
Created | 2016-04-11T21:00:51.000+0000 |
Updated | 2016-06-21T17:44:41.000+0000 |
Description
Steps to reproduce
1. Create a Picker with 2 columns
2. PickerRow title set to "0" in XML (or "1", "2", etc)
3. App crashes immediately
Setting the PickerRow title to "0" in the controller js works fine. Android either method works fine.
*index.xml*
<Alloy>
<Window class="container">
<View top="10" layout="vertical" height="Ti.UI.SIZE" width="Ti.UI.FILL">
<Label color="white">How Much To Add?</Label>
<Picker id="timeAmount" useSpinner="true">
<PickerColumn id="hours" width="50%">
<PickerRow title="0"/>
<PickerRow title="1"/>
<PickerRow title="2"/>
<PickerRow title="3"/>
<PickerRow title="4"/>
</PickerColumn>
<PickerColumn id="min" width="50%">
<PickerRow title=".00"/>
<PickerRow title=".25"/>
<PickerRow title=".50"/>
<PickerRow title=".75"/>
</PickerColumn>
</Picker>
</View>
</Window>
</Alloy>
*index.js*
$.index.open();
[~fokkezb] I remember we had a similar issue not too long ago. Do you know more? Anyway, the fix should be easy by wrapping the String correctly.
PR: https://github.com/appcelerator/titanium_mobile/pull/7935 Demo:
[~hansknoechel] yes, TIMOB-23130 - both caused by ALOY-1355.
Verified as fixed, Creating PickerRows with Non-String titles no longer causes an app to crash, tested both with classic & alloy mobile projects. Tested On: iPhone 6S (9.3.2) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160617074028 Appc Studio: 4.7.0.201606150733 Appc NPM: 4.2.7-2 App CLI: 5.4.0-18 Xcode 7.3 Node v4.2.6 *Closing ticket.*