Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17160] iOS: titleid/textid can not be changed after window is opened

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelslabel, title, titleid
ReporterMatej
AssigneeUnknown
Created2014-06-13T20:12:22.000+0000
Updated2018-02-28T20:04:06.000+0000

Description

The property titleid/textid can not reset if window was opened. app.js
var win1 = Titanium.UI.createWindow({
    backgroundColor: 'red',
    titleid: L("title")
});

var win2 = Titanium.UI.iOS.createNavigationWindow({
   window: win1
});

var button = Titanium.UI.createButton({
    title: 'change the title'
});

button.addEventListener('click', function(){
    win1.titleid = L("new_title", "not found");
});
 
win1.add(button);

win2.open();
i18n (strings.xml)
<?xml version="1.0" encoding="UTF-8"?>
<resources>
        <string name="title">Title</string>
	<string name="new_title">New Title</string>
</resources>
Also happened in Ti.UI.Label.textid.

Comments

  1. Shuo Liang 2014-06-16

    Hi, Only one of title or titleid should be specified, Based on your code, title of window 2 has been defined first, so the titleid will not affect any more. On the other hand, when you have title and titleid properties together(although it is a wrong way), title will be consider as priority. Regards, Shuo
  2. Matej 2014-06-16

    Sorry ,but I don't fully understand. If window2 has defined title or titleid then I can change the title later without any problems ,but I can't do anything with titleid even if only titleid has been defined. That's normal?
  3. Shuo Liang 2014-06-16

    oh, I see your problem. Seems titleid can not re-set after window is open. I will move this ticket to our engineer team to check this. Thank you for your report.
  4. Matej 2014-06-16

  5. Jick Steen 2014-07-26

    Does this issue cover the case that a window title is not possible to be changed after the window is opened if already a title was set but no titleid?

JSON Source