Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4890] Properties of Titanium.UI.View members can not be deleted

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionDuplicate
Resolution Date2011-08-04T13:16:42.000+0000
Affected Version/sn/a
Fix Version/sSprint 2011-31
ComponentsiOS
Labelsview
ReporterMikhail Yurasov
AssigneeBlain Hamon
Created2011-06-23T06:44:57.000+0000
Updated2017-03-03T22:30:29.000+0000

Description

Properties of Titanium.UI.View members can not be deleted
var myApp = {};

myApp.ui = {};

myApp.ui.createMyView = function() {
    var v = Ti.UI.createView({});
    v.abc = {a:1,b:2,c:3};
    return v;
};

var testVar = {abc:{a:1,b:2,c:3}};
var myView = myApp.ui.createMyView();

alert(JSON.stringify(myView.abc));    // {"a":1,"b":2,"c":3}
alert(JSON.stringify(testVar.abc));   // {"a":1,"b":2,"c":3}

delete myView.abc.a;
delete testVar.abc.a;

alert(JSON.stringify(myView.abc));    // {"a":1,"b":2,"c":3} !!!, shold be {"b":2,"c":3}
alert(JSON.stringify(testVar.abc));   // {"b":2,"c":3} - OK

Comments

  1. Paul Dowsett 2011-08-04

  2. Blain Hamon 2011-08-04

  3. Lee Morris 2017-03-03

    Closing as duplicate.

JSON Source