Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19551] Android: children not be created from Ti.UI.createView call

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2015-09-21T07:24:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
LabelsView, android, children
ReporterAndrey Tkachenko
AssigneeEric Merriman
Created2015-09-15T09:13:29.000+0000
Updated2017-03-23T21:35:04.000+0000

Description

Comments

  1. Ashraf Abu 2015-09-21

    Resolving this as invalid. According to the docs in http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.View-property-children, the children property is READONLY.
  2. Andrey Tkachenko 2015-09-21

    So, should be changed ios implementation or docs?
  3. Ashraf Abu 2015-09-21

    The ios implementation should change.
  4. Andrey Tkachenko 2015-09-21

    It changes can hence break related code in ios related projects. I think it requires discussion the topic that requires changes.
  5. Ashraf Abu 2015-09-21

    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();
       
  6. Andrey Tkachenko 2015-09-21

    No :) please open the link from description section this bug report.
  7. Ashraf Abu 2015-09-21

  8. Andrey Tkachenko 2015-09-21

    Exactly! And it would be very useful, not only in this case. :)
  9. Andrey Tkachenko 2015-09-21

    Because this issue resolved as invalid I created another one TC-5693
  10. Lee Morris 2017-03-23

    Closing ticket as invalid with reference to the previous comments.

JSON Source