[TIMOB-24382] Windows: Adding same component multiple times should not cause error
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-02-10T11:10:05.000+0000 |
Affected Version/s | Release 6.0.0 |
Fix Version/s | Release 6.1.0 |
Components | Windows |
Labels | parity |
Reporter | Kota Iguchi |
Assignee | Kota Iguchi |
Created | 2017-02-08T01:56:44.000+0000 |
Updated | 2017-02-13T22:55:50.000+0000 |
Description
This is parity issue to align with behavior on iOS. We should accept logical error when developer tries to add one component multiple times onto same parent. For instance following code does not throw exception on iOS, but on Windows it causes exception with
add: No installed components were detected. Element is already the child of another element
. We should be able to ignore this type of logical errors to keep parity with iOS.
var win = Ti.UI.createWindow({backgroundColor:'green'});
var label = Ti.UI.createLabel({text:'Test'});
win.add(label);
win.add(label);
win.open();
https://github.com/appcelerator/titanium_mobile_windows/pull/948
Verified improvement, when running the test case provided in the description no error message is shown and the test label is shown on a green background. *Environment*