1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    31
    Vote Rating
    0
    lastid is on a distinguished road

      0  

    Default Unanswered: How to launch app manually with javascript

    Unanswered: How to launch app manually with javascript


    I'm trying to implement an auto update feature for my application running in a webview.

    The server tells the app to update. So the next time the app launches, it will use a new app.js file from the server.

    The thing is if somehow the app cannot download the new app.js from the server, i want to use the app.js file installed with the application.

    I already implemented a fallback to use the app.js file installed with the application when I cannot download the new one. But the interface is just blank. I think what may happen is:

    - The webview download the new app.js file, which fails
    - The document fires domready event
    - The webview loads the local app.js file (installed with the application)

    So the new javascript file misses the domready event so it wont launch the application. I might be wrong.

    Someone knows how to launch the app when the new app.js file loaded (onload...)

    I already verify that Ext.setup function is run, but nothing happens.

    Thanks.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You can manually execute the launch method in your app.js. You can set a flag on the namespace that it's executed, if not then fire the launch method. Kind of dirty but launch won't fire if you load it after the document is ready.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar