Results 1 to 6 of 6

Thread: Restart Sencha Touch Application

  1. #1
    Sencha User
    Join Date
    Aug 2011
    Posts
    5

    Thumbs up Restart Sencha Touch Application

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

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

    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 @LikelyMitch
    Modus Create, Senior Fullstack Engineer
    ________________
    Modus Create is based on the model of an open source team. We’re a remote, global team of experts in our field. To find out more about the work we do, head over to our website.

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

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    5

    Default 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
    Answers
    1

    Default Restart Sencha Application

    Hi,

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

  5. #5
    Touch Premium Member
    Join Date
    Nov 2011
    Posts
    5

    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
    31

    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

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
  •