Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-28504

Android: ScrollableView "views" property not returning what was assigned during creation before window open as of 10.0.1

    Details

    • Story Points:
      3

      Description

      Summary:
      Reading the ScrollableView object's "views" property does not return what was assigned to it during creation before the window is opened. The returned array is wrongly empty. This property won't return expected array until after the window opens.

      This bug was introduced in Titanium 10.0.1 and was caught before release.

      Steps to reproduce:

      1. Build and run the below on Android.
      2. Notice in the log "@@@ view.length" wrongly returns 0.

      const window = Ti.UI.createWindow();
      const scrollableView = Ti.UI.createScrollableView({
      	views: [
      		Ti.UI.createLabel({ text: "Page 1" }),
      		Ti.UI.createLabel({ text: "Page 2" }),
      		Ti.UI.createLabel({ text: "Page 3" }),
      	],
      	showPagingControl: true,
      });
      console.log(`@@@ views.length: ${scrollableView.views.length}`); // uh-oh
      window.add(scrollableView);
      window.open();
      

      Note:
      This is a regression caused by TIMOB-28459.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jquick Joshua Quick
                Reporter:
                jquick Joshua Quick
                Reviewer:
                Gary Mathews
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                    Git Integration