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

iOS: Focus and open events don't fire on first window when require() is used

    Details

      Description

      Problem

      There is a regression in mobile SDK 2.1.0.v20120608174150 that causes an intermittent failure of open and focus events at the Window level. Sometimes neither event will fire. Sometimes the open event fires but the focus event won't.

      Testcase

      Use the sample project that is attached. This code is reduced down from a much larger app. I have reduced it down as far as I can and still demonstrate the problem. You'll notice that much of the code in the require()d and/or include()d units is not executed, but removing it hides the problem. During testing, I noticed that volume of code seemed to affect the reproducibility of the problem.

      Just run the app, and look at the console log. You may need to run it several times! In my testing, it failed more often than it succeeded.

      Expected Result

      In the console log you should see:

      == Loading Procs
      == Loading Themes
      top
      bottom
      MainWinLoad fired
      MainWinFocus fired from [object Object]

      Actual Result

      == Loading Procs
      == Loading Themes
      top
      bottom

      sometimes the "MainWinLoad fired" line will show up, and sometimes the "MainWinFocus fired from [object Object]" line also appears.

        Attachments

          Activity

            People

            • Assignee:
              vduggal Vishal Duggal (Inactive)
              Reporter:
              bitshftr Shawn Lipscomb
              Reviewer:
              Sabil Rahim
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-13662
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Integration