0
var MyClass = new Class({
    foo:function(){
        var = new Fung({
            go:function(this){
                this.bar();  
            }
        });
    },

    bar:function(){
        alert('hello world');
    }
});

Im trying to access method from inside nested class. Is this possible?

1
  • 1
    You need to show the definition of the Class constructor function. Commented Jan 20, 2012 at 4:21

1 Answer 1

3
var MyClass = new Class({
    foo:function(){
        var that = this;
        var = new Fung({
            go:function(){
                that.bar();  
            }
        });
    },

    bar:function(){
        alert('hello world');
    }
});
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.