facebook

Is there a way to reinitialize the app?

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #327245 Reply

    Douger
    Member

    Hi, I would like to be able to basically restart the app when a user presses a button. (and by restart I mean reinitialize the app, basically like it just started again) Is that possible ?

    #327247 Reply

    support-michael
    Keymaster

    @Douger

    Interesting question… I have not thought about this before. Are you talking about an app or a mobile webapp because an app has a bootstrap stage that I would need to discuss w/ dev team?

    My 1st thought is to connect a gotoURL button that simply loads the startup doc, e.g., index.html. Let us know you app type (app or webapp) and we will see what we can determine.

    #327251 Reply

    Douger
    Member

    @support-wayne wrote:

    @Douger

    Interesting question… I have not thought about this before. Are you talking about an app or a mobile webapp because an app has a bootstrap stage that I would need to discuss w/ dev team?

    My 1st thought is to connect a gotoURL button that simply loads the startup doc, e.g., index.html. Let us know you app type (app or webapp) and we will see what we can determine.

    Hi Wayne, its a web app. I tried your first thought that without success which is why i posted. Basically there are open events I would like to re-execute only in certain circumstances (which is why I would tie to a button). I may try calling the open routine from the button and see if that works.

    #327252 Reply

    Douger
    Member

    Hi Wayne, just tried what I was thinking and it worked! I basically did a Run JavaScript and on the on click event called the open() routine. Thanks for getting my mind going again!

    #327257 Reply

    Hi Douger,

    That’s great. Thanks for follow up informing that you got it.

    #327307 Reply

    Max87
    Member

    Hello Octavio,
    I have similar question – I need to restart my app after clicking the button too.
    But I’d like to clear and drop the database tables and reinitialize it after clicking a button.

    I have a button – set function resetGame which contains code for deleting and dropping tables,. If I add window.location.reload() into resetGame, it ignores table deleting and dropping and simply reloads page. Then, duplicable entries are created.

    My question, is there a option, how to know, if table exists and run another function depending on this conditional?
    My goal is, how to run window.loacation after tables are deleted and dropped.
    Thanks for help.

    #327378 Reply

    Hi Max,

    We are investigating a couple of options for app reset and your db reinitialization problem.

    #327380 Reply

    Max87
    Member

    Thanks for help…
    I solved my problem temporarily, that I added another button, which is hidden in the beginning, after clicking reset is executed resetGame function(tables are deleted) and the Reset button fades to new button, which has window.location.reload set on click…It’s not perfect solution, but it works(it creates strange graphics errors such as main toolbar is hidden etc – I will work on it later).
    Anyway, if you come with better solution, I will be happy to use it.
    Thanks.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: Is there a way to reinitialize the app?

You must be logged in to post in the forum log in