1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    5
    Vote Rating
    0
    mfaisal is on a distinguished road

      0  

    Thumbs up Unanswered: Restart Sencha Touch Application

    Unanswered: Restart Sencha Touch Application


    I want to restart sencha application programmatically on button click.
    Is there any way to do this?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,642
    Vote Rating
    899
    Answers
    3574
    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


    Yes you can but you have to do it manually... rerender what you needs.... reset things that you set throughout your app... or just redirect to the same url (not optimal)
    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.

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    5
    Vote Rating
    0
    mfaisal is on a distinguished road

      0  

    Default Restart Sencha Touch Application

    Restart Sencha Touch Application


    How i can restart sencha tuoch application through js code on button click.

  4. #4
    Sencha User
    Join Date
    Jun 2011
    Location
    Kochi, Kerala, India
    Posts
    8
    Vote Rating
    0
    Answers
    1
    heyjii is on a distinguished road

      0  

    Default Restart Sencha Application

    Restart Sencha Application


    Hi,

    You can use
    window.location.href = 'your starting page';

  5. #5
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    5
    Vote Rating
    0
    jjamid is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    or just redirect to the same url (not optimal)
    This seems like the obvious solution - however on Safari/iOS5 when doing that the browser does not reload the page correctly.
    I've tried to add some random string to the link to make it think it's a new url but it also didn't work - it seems that maybe the launch function doesn't run again. I also tried to add a 'no-cache' meta tag.

    The redirect is done like this:
    window.location.replace/assign(appPath);

    It would have been nice if there was a "restart" function

  6. #6
    Sencha User
    Join Date
    May 2013
    Posts
    22
    Vote Rating
    1
    tavojavi is on a distinguished road

      0  

    Default


    Hello JJamid,

    have you found a way to restart the app??

    In my case, we add components on the fly, and that is causing some crashes (the loading mask does not disappear because a javascript error)

    I would like to capture those errors and restart the app, is there any way to do that?

    Thanks!
    Gustavo