How does onUpdated work

醉酒当歌 提交于 2019-12-02 19:57:31

问题


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 ?


回答1:


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



来源:https://stackoverflow.com/questions/11901800/how-does-onupdated-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!