Consider the code pasted below.  This will not work because the
anonymous function will be executed in 'each's scope.  I have a class
with a bunch of callbacks that depend on other methods.  Is there a
way to make this work?  Thanks. --JK

var test = new baz();
test.foo();

var baz = function(){
        this.foo = function(){
                $R(1,2).each(function(item){
                        this.bar();
                });
        }

        this.bar = function(){
                alert('bar');
        }
}



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to