Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7952] iOS:Label does not redraw when text property is changed

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-05T16:26:32.000+0000
Affected Version/sRelease 2.0.0
Fix Version/sRelease 2.0.0, Sprint 2012-06
ComponentsiOS
Labelsmodule_label, qe-testadded, regression
ReporterDevang Gandhi
AssigneeVishal Duggal
Created2012-03-09T16:32:42.000+0000
Updated2012-04-05T16:26:32.000+0000

Description

Label text does not redraw, when the text property is changed. The user first creates a label, and then dynamically changes its text property, using label.text property. Expected behavior: The label property should change. Actual Behavior: The label property does not change. The code works for 1.8.2, but fails in the latest CI builds.(tested in 7th March, and 9th March) {noformat} var win1 = Titanium.UI.createWindow({ backgroundColor:'white' }); var label = Ti.UI.createLabel({ text: '' }); win1.add(label); setTimeout(function(){ label.text = "show up"; Ti.API.info(label.text); }, 1000); win1.open(); var label2 = Ti.UI.createLabel({ text: 'asdadasd asdaj lsdak l', width: 'auto' }); Ti.API.info("label2 width: " + label2.size.width); {noformat}

Comments

  1. Dustin Hyde 2012-03-15

    Closing as Fixed. SDK: 2.0.0.v20120315140247 Studio: 2.0.0.201203142055 OS: Snow Leopard Devices Tested: iPhone Simulator 5.0, iPhone4 5.0.1
       var win1 = Titanium.UI.createWindow({  
           backgroundColor:'white'
       });
       
       var label = Ti.UI.createLabel({
         text:'wait two seconds for label update'
       });
       
       win1.add(label);
       
       setTimeout(function(){
         label.text = "label updated correctly";
         Ti.API.info(label.text);
       }, 2000);
       
       win1.open();
       
  2. Michael Pettiford 2012-04-05

    Reopening/closing to add/remove label

JSON Source