GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-29T17:52:10.000+0000 |
Affected Version/s | Release 3.3.0 |
Fix Version/s | Release 3.4.0 |
Components | Android |
Labels | 3.3.0.GA, TCSupport, android, getSection, ios, listSections, listView, listiSection, module_listview, qe-testadded, regression, sections |
Reporter | Libera |
Assignee | Hieu Pham |
Created | 2014-08-04T15:17:41.000+0000 |
Updated | 2014-10-13T20:52:30.000+0000 |
Problem Description
I see, that on iOS listView.getSections(0) and listView.sections[0] return [object TiUIListSection] while on Android listView.getSections(0) return nothing and listView.sections[0] returns undefined on Titanium 3.3.0GA.
On Titanium 3.2.3GA this code work fine on both platform, iOS and Android, but now it works only on iOS.
Steps to reproduce
- Create a Classic Titanium project
- Paste the testcase into app.js
- Run this with testing environment
- Check the logs in Ti Studio
Testcase
var data = {
properties : {
title : "Sample"
}
};
var listView = Titanium.UI.createListView({});
var listSections = Titanium.UI.createListSection({});
listSections.setItems([data]);
listView.setSections([listSections]);
Ti.API.info(listView.sections[0]);//undefined
Ti.API.info(listView.sections[0].items);//ERROR
Ti.API.info(listView.sections[0].items.length); //ERROR
Actual Results
On Android listView.getSections(0) return nothing and listView.sections[0] returns undefined on Titanium SDK 3.3.0GA.
Issue reproduces in Titanium SDK version 3.4.0 master, 3.3.0.GA But works fine in Titanium SDK version 3.2.3.GA Titanium Studio, build: 3.3.0.201407100905 Titanium Command-Line Interface CLI version 3.3.0, Android device : Motorola Moto G, Android version : 4.4.4
Hieu, can you please take a look?
Verified the fix. Now, listView.sections[0] returns ----- [object ListSection] listView.sections[0].items returns----- [object Object] listView.sections[0].items.length returns ----- 1 Closing. Environment: Appc Studio : 3.4.0.201408282203 Ti SDK : 3.4.0.v20140829104912 Mac OSX : 10.9.4 Alloy : 1.5.0-dev CLI - 3.4.0-dev Code Processor: 1.1.1 Android 4.4.4 -Nexus 5