[TIMOB-1056] Multi tb group tableView fails to render
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Trivial |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2012-06-22T12:16:35.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Sprint 2012-13 API |
| Components | iOS |
| Labels | api |
| Reporter | ctredway |
| Assignee | Vishal Duggal |
| Created | 2011-04-15T02:42:44.000+0000 |
| Updated | 2017-03-03T22:52:56.000+0000 |
Description
A customer has an app where he has multiple tab groups. After switching to the second group and then going back the first group, the table view fails to render. Files can be found here:
http://helpdesk.appcelerator.net/tickets/2840">http://helpdesk.appcelerator.net/tickets/2840
Attachments
| File | Date | Size |
|---|---|---|
| resources.zip | 2011-04-15T02:42:44.000+0000 | 28053 |
valid, needs testcase
attached files from original helpdesk ticket. To repro (happens in emulator and device):
1.launch app, note table
2.tap "show group 2"
3. in the resulting window, tap "show group 1"
results, table view is not shown
1054 Bug scrub: valid. Test case attached with bug Tested On: Mac OSX Lion TiMob 1.8.0 TiStud: 1.0.4.201108101535 Devices Tested On: iPhone Simulator
Bad Code. Here is how you need to write your win1.js
Ti.API.info('win1'); Ti.include('global.js'); var win = Ti.UI.currentWindow; var loginButton = Ti.UI.createButton({title:'show group 2', top:0, width:'150', height:'40'}); win.add(loginButton); // create table view var tableViewOptions = { //data:data, top:50, //headerTitle:'Settings', style:Titanium.UI.iPhone.TableViewStyle.GROUPED, backgroundColor:'transparent', rowBackgroundColor:'white' }; // create table view var tableview = Titanium.UI.createTableView(tableViewOptions); win.add(tableview); function addData() { Ti.API.info('addData'); var data = [ //{title:'Language', hasChild:true, url:'language.js'}, {title:'About', hasChild:true, header:''}, {title:'Visit easyMedMobile.com', hasChild:true}, {title:'Terms and Conditions', hasChild:true}, {title:'Log out', hasChild:true, header:''} ]; tableview.setData(data); } var event_win1_listener = function(e){ Ti.API.info("event_win1"); addData(); } if(Titanium.App.Properties.getBool("event_win1") == false) { Titanium.App.Properties.setBool("event_win1", true); Titanium.App.addEventListener('event_win1', event_win1_listener); } loginButton.addEventListener('click', function() { Titanium.UI.currentTabGroup.close(); Titanium.App.Properties.setBool("event_win1", false); Titanium.App.removeEventListener('event_win1', event_win1_listener); showGroup2(); // }); Ti.App.fireEvent('event_win1');Closing ticket as invalid