0

I'm currently trying to check wether there is a new update of my app before the whole app is loading, this in order to speed the loading up a bit.

So I was trying to figure out how and when the onUpdated function is called but I can't seem to find anything in the ST sources.

Ext.application({

  ...

  onUpdated: function() {
    var title, message;
    title   = 'Application Update';
    message = 'A new version of this site is available. Reload now?';
    Ext.Msg.confirm(title, message, function(buttonId) {
      if (buttonId === 'yes') {
        window.location.reload();
      }
    });
  }
});

Basically two questions :

When is the onUpdated function called in the framework ?

How can I check wether there is an update or not before the whole app is loaded and rendered ?

4

1 回答 1

1

Check out the detailed explanation by Jacky Nguyen on Sencha Touch 2.x Forum post!

于 2012-08-11T08:46:56.670 回答