[TIMOB-19551] Android: children not be created from Ti.UI.createView call
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2015-09-21T07:24:23.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | View, android, children |
| Reporter | Andrey Tkachenko |
| Assignee | Eric Merriman |
| Created | 2015-09-15T09:13:29.000+0000 |
| Updated | 2017-03-23T21:35:04.000+0000 |
Resolving this as invalid. According to the docs in http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-children, the
childrenproperty isREADONLY.So, should be changed ios implementation or docs?
The ios implementation should change.
It changes can hence break related code in ios related projects. I think it requires discussion the topic that requires changes.
Perhaps you could do something like this using this method, add,[http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-method-add] instead of using the property
children:-.var win = Ti.UI.createWindow({ backgroundColor : 'white' }); var textView = Ti.UI.createView({ backgroundColor : 'red', width : '200', height : '100' }); var text = Ti.UI.createLabel({ text : "hello!" }); textView.add(text); /* var view = Ti.UI.createView({ children : [textView] }); */ var view = Ti.UI.createView({}); view.add(textView); win.add(view); win.open();No :) please open the link from description section this bug report.
Exactly! And it would be very useful, not only in this case. :)
Because this issue resolved as invalid I created another one TC-5693
Closing ticket as invalid with reference to the previous comments.