Titanium JIRA Archive
Appcelerator Community (AC)

[AC-788] textid is not working after Label is shown

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2014-06-16T07:24:29.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelslabel, text, textid
ReporterMatej
AssigneeSteven Scott
Created2014-06-13T20:23:18.000+0000
Updated2016-03-08T07:37:03.000+0000

Description

It is not possible to set up a new textid after a Label is shown however a property text does work. app.js
var win = Titanium.UI.createWindow({
    backgroundColor: 'red',
   	title: 'Red Window'
});

var label = Ti.UI.createLabel({
	text: "Label",
	backgroundColor: "blue"
});

win.add(label);
win.open();


setTimeout(function() {
	label.textid = "new_text";
	//label.text = L("new_text"); // Does work
}, 1000);
i18n (strings.xml)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
	<string name="new_text">New Text</string>
</resources>

Comments

  1. Matej 2014-06-13

  2. Shuo Liang 2014-06-16

JSON Source