Details
-
Type:
Bug
-
Status: Open
-
Resolution: Unresolved
-
Affects Version/s: Release 5.4.0
-
Fix Version/s: None
-
Component/s: None
-
Labels:
-
Environment:
Operating System
Name = Microsoft Windows 10 Professionnel
Version = 10.0.10586
Architecture = 32bit- CPUs = 8
Memory = 7.9GB
Node.js
Node.js Version = 4.4.2
npm Version = 2.15.0Titanium CLI
CLI Version = 5.0.6
node-appc Version = 0.2.31Titanium SDKs
5.4.0.v20160402025807
Version = 5.4.0
Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160402025807
Platforms = android, mobileweb, windows
git Hash = b32c985
git Timestamp = 04/02/16 02:58
node-appc Version = 0.2.35Operating System Name = Microsoft Windows 10 Professionnel Version = 10.0.10586 Architecture = 32bit CPUs = 8 Memory = 7.9GB Node.js Node.js Version = 4.4.2 npm Version = 2.15.0 Titanium CLI CLI Version = 5.0.6 node-appc Version = 0.2.31 Titanium SDKs 5.4.0.v20160402025807 Version = 5.4.0 Install Location = C:\ProgramData\Titanium\mobilesdk\win32\5.4.0.v20160402025807 Platforms = android, mobileweb, windows git Hash = b32c985 git Timestamp = 04/02/16 02:58 node-appc Version = 0.2.35 - CPUs = 8
Description
When I try to add data to Picker, my application crash with Unknown exception.
I tried with SDK 5.2.0.GA and it's work. But on SDK 5.4.0.v20160402025807 it crash.
I tried this
var picker = Ti.UI.createPicker({
|
columns: [ column1, column2 ]
|
});
|
==> CRASH
and I tried to create the picker and after add columns or data like this and it crash too.
picker.add([ column1, column2 ]);
|
==> CRASH
OR
picker.add(data1);
|
==> CRASH
OR
picker.add([data1]);
|
==> CRASH
Please help.
The source code :
//index.xml
<Alloy>
|
<Window class="container" onClick="doClick">
|
</Window>
|
</Alloy>
|
//index.js
function doClick(e) {
|
var win = Ti.UI.createWindow({});
|
|
var data1 = [];
|
data1[0] = Ti.UI.createPickerRow({ title: 'Bananas'});
|
data1[1] = Ti.UI.createPickerRow({ title: 'Strawberries'});
|
data1[2] = Ti.UI.createPickerRow({ title: 'Mangos' });
|
data1[3] = Ti.UI.createPickerRow({ title: 'Grapes' });
|
|
var data2 = [];
|
data2[0] = Ti.UI.createPickerRow({ title: 'red', color: 'red', font: { fontSize: 30, fontFamily: 'Times New Roman' } });
|
data2[1] = Ti.UI.createPickerRow({ title: 'blue', color: 'blue' });
|
data2[2] = Ti.UI.createPickerRow({ title: 'yellow', color: 'yellow' });
|
data2[3] = Ti.UI.createPickerRow({ title: 'green', color: 'green' });
|
|
var column1 = Ti.UI.createPickerColumn();
|
var column2 = Ti.UI.createPickerColumn();
|
|
for (var i = 0; i < data1.length; i++) {
|
column1.addRow(data1[i]);
|
}
|
|
for (var i = 0; i < data2.length; i++) {
|
column2.addRow(data2[i]);
|
}
|
|
var picker = Ti.UI.createPicker({
|
columns: [ column1, column2 ]
|
});
|
// picker.add([ column1, column2 ]);
|
|
picker.addEventListener('change', function (e) {
|
Ti.API.info("User selected: " + JSON.stringify(e.selectedValue));
|
});
|
|
win.add(picker);
|
win.open();
|
}
|
|
$.index.open();
|