• Hi !

    class A {
    	constructor(x, y){
    	//class field...
    	}
    
    	AsyncFuncA(){
    	//code...
    	}
    
    	run(){
    	//call async code
    		setInterval(() => {
    	  		this.AsyncFuncA();
    		}, 1000)
    	}
    }
    
    class B {
    	constructor(x, y){
    		super(x,y);
    	}
    
    	AsyncFuncB(){
           //code...
    	}
    
    	run(){
    	//call async code
    		super.run();
    		setInterval(() => {
    	  	// Todo...
    	  		this.AsyncFuncB();
    		}, 2000);
    	}
    }
    /***************************************­*******/
    let ob = new B(x, y);
    ob.run();
    

    an error occurs when you call run() -> this.AsyncFuncA()
    Web IDE:

    "Uncaught Error: Function "AsyncFuncA" not found!
    at line 248 col 6
    this.AsyncFuncA();

      ^
    

    in function called from system"

    how can this be fought ?

About

Avatar for Konkery @Konkery started