Affects Version/s: Release 2.1.0
- Titanium SDK 2.1.0.v20120608174150
- Titanium Studio 126.96.36.199205311912
- iOS 5.0 (simulator), 5.1 (simulator)
- Mac OSX 10.7.2
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.
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.
In the console log you should see:
sometimes the "MainWinLoad fired" line will show up, and sometimes the "MainWinFocus fired from [object Object]" line also appears.