Results 1 to 4 of 4

Thread: Script loader

  1. #1
    Sencha User
    Join Date
    Aug 2009
    Posts
    96

    Default Script loader

    Does the framework have script loader function similar to that of Head JS (http://headjs.com/)? We are experiencing long startup time and are looking for ways to defer script loading.

    Head JS helps, but we rather not use it if the same can be done in Sencha Touch.

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Are you just wanting to delay the firing of the setup method?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Aug 2009
    Posts
    96

    Default

    Quote Originally Posted by mitchellsimoens View Post
    Are you just wanting to delay the firing of the setup method?
    No, I want to delay loading of script file.

    Say I have:

    Index.html
    Main.js
    View1.js
    View2.js

    I only need Main.js and View1.js for startup. I don't need View2.js until User click on a button on View1.js.

    With Head JS, I can declare Main.js and View1.js in index.html. And load View2.js when User clicks a button on View1.

    Example:
    Code:
    myHandleOnClick : function() {
            head.js(
                    "https://domain/app/helper/myHelper.js", function() {
                        // after script load
                        new App.MyHelper().showView2();
                    });
        }
    My question is: does Sencha Touch have similar method? and where to find an example? Thanks.

  4. #4

    Default

    mitchellsimoens,

    How can I delay the setup of sencha (not using the MVC)?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •