No components visible in TableView in 1.4
The following code works fine in 1.3.2
var win = Titanium.UI.createWindow({backgroundColor:'#ff0'});
var table = Titanium.UI.createTableView();
table.appendRow(Titanium.UI.createTableViewRow({title:'ROW #1'}));
var row = Titanium.UI.createTableViewRow();
var label = Titanium.UI.createLabel({text:'ROW #2'});
row.add(label);
table.appendRow(row);
win.add(table);
win.open();
It displays a table with 2 rows. With 1.4.0 only the first row is displayed. I wrote this test app since in my real app with 1.4.0 only blank tables are displayed.
I also read that you might have to set width/height whatever on the label and I tried lots of things, e.g. added textAlign:'left',left:0,width:'auto',height:'auto'
to the label but nothings helps.
BTW: I tested in the iPhone simulator only so far since run on device and package both just say "packaging error" or something similar after a few seconds.
Any ideas?
6 Answers
-
Accepted Answer
There seems to be a known bug introduced with 1.4.0. Add a "className" attribute to the TableViewRow and it should work.
-
I can confirm this.
-
Yes, this is what is happening to me too.
I have higher rows than it should be and empty.
If I scroll a little,the data appears.
-
Same problem here guys. Have also submitted a support ticket with our Premium subscription about this problem. Hopefully we'll have answers soon.
-
@Brandon I have classNames on all my tables, no matter how they big they are. It's the way I code.
-
duplicate