Results 1 to 5 of 5

Thread: disable Ext.Microloader.run() via configuration

  1. #1

    Default disable Ext.Microloader.run() via configuration

    hi there,

    we want to run Ext.Microloader.run() manually after some ajax call we are doing.

    is there a way to disable the run of it via some configuration settings in app.json or bootstrap.json or in the build properties?

    or is there a way to run some custom code before any viewport rendering?
    we tried everything but at the moment i have removed the .run() from .sencha/app/Microloader.js on the local development machines. in the development build result (via jenkins) i'm regex'ing out the .run() from index.html.


    any help is appreciated.

  2. #2
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    In your launch method, you could execute whatever code you need to (for example, the ajax request), and then instantiate the viewport in the callback.

    Thanks!
    Joel

  3. #3
    Sencha User
    Join Date
    Nov 2015
    Location
    Romania,Timisoara
    Posts
    14
    Answers
    2

    Default

    Quote Originally Posted by joel.watson View Post
    In your launch method, you could execute whatever code you need to (for example, the ajax request), and then instantiate the viewport in the callback.

    Thanks!
    Joel

    Launch method of what? app.js ? Application.js ? Main.js ?

  4. #4

    Default

    i think the problem is that we also have in our models(and stores? @darius) a custom native javascript function to lookup translations (# description: translate("this.and.that.string") ).

    once the launch is fired the models are all been initiated already -> our translation dictionary isnt loaded fully at this time -> translation will fail.

    so in best circumstances we want to run the whole ExtJS bootstrap, including models and stores initialising, after the ajax has send an response.

    we also tried to wrap the Ext.define() of our app into a vanilla javascript function. this works fine as long as we don't build: sencha app build production.
    if we try to run the generated code from above build the rendering of views and models seem to fail. page will stay blank, no errors.

  5. #5
    Sencha User joel.watson's Avatar
    Join Date
    Nov 2014
    Posts
    3,120
    Answers
    446

    Default

    Quote Originally Posted by 30081996 View Post
    Launch method of what? app.js ? Application.js ? Main.js ?
    Application.js should work.

    Thanks
    Joel

  6. #6

    Default

    i think the problem is that we also have in our models(and stores? @darius) a custom native javascript function to lookup translations (# description: translate("this.and.that.string") ). <br>
    <br>
    once the launch is fired the models are all been initiated already -&gt; our translation dictionary isnt loaded fully at this time -&gt; translation will fail. <br>
    <br>
    so in best circumstances we want to run the whole ExtJS bootstrap, including models and stores initialising, after the ajax has send an response. <br>
    <br>
    we also tried to wrap the Ext.define() of our app into a vanilla javascript function. this works fine as long as we don't build: sencha app build production. <br>
    if we try to run the generated code from above build the rendering of views and models seem to fail. page will stay blank, no errors.

Similar Threads

  1. [5.0.2] bug in Microloader.js
    By urban.novak in forum Sencha Cmd
    Replies: 0
    Last Post: 3 Sep 2014, 5:29 AM
  2. ExtJS and microloader
    By alexander.urban in forum Sencha Cmd
    Replies: 6
    Last Post: 5 Apr 2014, 9:08 PM
  3. Different microloader
    By nora.olsen77 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 28 May 2013, 6:56 AM
  4. Multiple CSS and microloader
    By pepperseb in forum Sencha Touch 2.x: Discussion
    Replies: 2
    Last Post: 24 May 2012, 4:18 AM
  5. Replies: 3
    Last Post: 23 Nov 2011, 1:36 PM

Tags for this Thread

Posting Permissions

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