1
제네릭 함수를 호출하려고하는데이 함수가 실행될 때 다른 범위 (윈도우)에 있습니다. 이 코드는 대소 문자를 구분합니다.Sencha 컨텍스트를 잃는 중
Ext.application({
name : 'Fiddle',
context: null,
function1 : function(){
this.function2(this.function3);
},
function2 : function(func){
func();
},
function3 : function(){
if(context == this){
Ext.Msg.alert('Fiddle', 'Same context!');
}
else {
Ext.Msg.alert('Fiddle', 'Different context!');
}
},
launch : function() {
context = this;
this.function1();
}
});
bind를 사용하려고하는데 작동하지 않습니다.
감사합니다!
감사합니다 많이! –