Hi,
I have this problem on iphone simulator and latest development
environment.
I have a window with a tableview (with custom tableViewRows) and a
close button in the bottom.
When I first open the window everything shows up, but when I close
the window and then open it again the content of the tableView
disappear. I have the tableview with the lines row separators but
with nothing is showing in the tableviewrows.
here is how I build the app.js you can test:
Titanium.UI.setBackgroundColor('#333');
var page2 = Titanium.UI.createWindow({
title:'page2',
backgroundColor:'#fff'
});
var data = [];
var listTable = Titanium.UI.createTableView({});
for(var indice=0; indice<15; indice++) {
var row = Titanium.UI.createTableViewRow();
var img = Titanium.UI.createImageView({
image:'KS_nav_ui.png',
width:50,
height:50,
left:0,
top:0
});
var label = Titanium.UI.createLabel({
text:indice,
font:{fontSize:14},
textAlign:'center',
borderColor:'black'
});
row.add(img);
row.add(label);
row.hasChild=false;
row.height = 50;
row.className = 'list';
data.push(row);
}
listTable.bottom = 50;
listTable.setData(data);
page2.add(listTable);
var b2 = Titanium.UI.createButton({
title:'CLOSE',
bottom:5,
height:40
});
page2.add(b2);
b2.addEventListener('click',function()
{
page2.close();
});
var win = Titanium.UI.createWindow({
title:'win',
backgroundColor:'#555'
});
var button = Titanium.UI.createButton({
title:'OPEN'
});
button.addEventListener('click',function()
{
page2.open();
});
win.add(button);
win.open();
I have got a same *critical* problem. I got just basic VIEW with vertical layout and Ti.UI.SIZE given as a height and 2 labels on that VIEW. When I click on row and open new window and return back, row content (VIEW) sometimes disappear but the row(s) presences it's height and SECTION titles. I've noticed that row content disappears when I just click on the row and row is highlighted with selected color effect and before the new window opened. Tested with 2.0.1GA2 and 2.1.0 (build from git 05/25/2012). IMHO, priority must be High. I'll try to record a video and submit it.
By the way, the problem started with 2.0.1, it was working well with 1.8.x.
Here is the video of the bugged application. It's tested with 2.1.0. [http://tinypic.com/player.php?v=288rvr6&s=6] I've also noticed that section titles disappear when scrolling table and when section become top shown one.
Here are the test project for the issue (tested with 2.0.1GA2): How to test: Click the button and open window with table, click on random row and open detail window, go back, click again, go back, go back (to main window) click and open window with table again, click on random row, go back.... and going like this. It's not always happen but it randomly disappears row content (container view or labels, I could't determine). I've tried with almost every combination of layout/height/width/top/left/right/bottom properties with container view and labels. FILE: app.js
FILE: main.js
FILE: table.js
FILE: detail.js
I've also noticed another bug which is probably related to this one. WebView on Window is also disappears completely after you open, close and open the window again. Main window is opened by TabGroup. And the window contains WebView does NOT use "url" property. It's created and added in same JS file with TabGroup (main Window). If I split window source code containing WebView to another JS file and using "url" property, it does NOT happen. I've tested it with latest Git build (2.1.0 2012-06-02) Shall I open another ticket for this additional issue?
@Hidayet - Yes, please.
Could not reproduce the issue in the attached app.js but was easily able to reproduce the second issue. Basically a context shutdown issue. When the winTable closes, it destroys the TableView object but does not destroy the winTable object (Created in a different context. As such the tableView still exists in the windows children array. So when you open the winTable window again a second tableView gets added to the children array on execution of table.js The Javascript workaround is simple enough. Add the following code File: table.js
File: detail.js
A separate ticket (TIMOB-9400) has been filed to address this issue.
Providing a JS workaround. Issue to fix the problem in the platform will be handled post 2.1.0
Note to QE- Use the first example code as the second set is covered in TIMOB-9400.
Verified fixed with SDK 2.1.0.v20120614124151 and iPhone 4 (5.0.1)
Reopening to update labels.