2012-09-11 18 views

回答

3

比方說,你有一個叫做MyApp.destroyWindow的函數,它帶有一個參數,一個Ext.window.Window的實例並銷燬它。使用Ext.defer來設置超時。

Ext.defer(MyApp.destroyWindow, /* function to call */ 
      5000, /* timeout in milliseconds */, 
      MyApp, /* scope of the called function */ 
      [myWindow] /* array of arguments to provide the function */ 
); 

有關如何使用它的更多信息,請參閱Ext.Function.deferExt.deferExt.Function.defer的別名,因此調用都可以使用。