Manual:Utilities:Delayed Task (Korean) (Legacy)

This version of our Learning Center is unmaintained.
This article may be out-of-date or contain incorrect information.
Please visit the new Sencha Learning Center for up-to-date material.

Go to the new Sencha Learning Center

From Sencha - Learn

Jump to: navigation, search
Summary: Function
Author: Ext Community Rhio.kim
Published: Unkown
Ext Version: 1.1
Languages: en.png English fr.png French kr.png Korean

기본 개념

Delay Task는 Native 객체인 Function 에 Ext 프레임웍에 의해서 자동으로 extension 됩니다. Manual:Utilities:Function 이곳을 참고하면 어떤 기능이 확장되는지 알 수 있을 것입니다.

확장된 함수들은 내부적으로 timeout 을 사용하여 함수의 사용을 늦출 뿐만 아니라 Scope 체인을 유지시켜주거나 Arguments 를 그대로 전달해주는 역활을 하기도 합니다.

Delay Task는 기본적으로 timeout 제어를 통해서 지정된 기능의 수행을 일시적으로 지연시키는 기능을 합니다.

만약 timeout으로 함수를 실행하기 원하면 Ext delay (API reference) 를 이용할 수 있습니다.


예제:

var fn = function(arg1, arg2){
  Ext.Msg.alert('Delayed message', 'I ' + arg1 + ' Ext with ' + arg2);
}
 
fn.defer(10000, this, ['like','php']);


10초 후에 fn 함수는 호출되어질 것이고 "I like Ext with php" 의 경고창이 팝업될 것입니다.

This page was last modified on 16 December 2008, at 14:32. This page has been accessed 4,705 times.