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

LiveView: App.js Lexical Scope local vars not globally available

    Details

      Description

      Variable defined in the `app.js` are not globally available. This is due to the project's app.js being executed outside of first loaded app.js context.

      TEST Normal
      1) Create app with code snippets below
      2) Build app
      Result: console will output 'Lex Scope Var'

      TEST Liveview
      1) Create app with code snippets below
      2) Build app with --liveview flag

      Expected Result: console will output 'Lex Scope Var'
      Actual Result: error due to lexvar not being defined

      Example Code

      //app.js
      var lexvar = 'Lex Scope Var';
      var require('test');
      

      //test.js
      console.log(lexvar);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                csullivan Christian Sullivan
                Reporter:
                csullivan Christian Sullivan
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Integration