MyClass = Class.create({
   initialize: function() {
      this.myField = null;
      Event.observe(window, 'load', function() {
         this.myField = new Field();
   myMethod: function() {


Field's constructor uses Scriptaculous's sliders, which require an
element to be already loaded.  That's why I'm only setting
this.myField when the window has loaded.  I see that my sliders get
initialized properly, but this.myField is still null when I call
myMethod().  I suspect this has something to do with the "this" scope
in my anonymous function.  How do I fix this to do what I intended?
You received this message because you are subscribed to the Google Groups 
"Prototype &" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to