Hi all
I have written a class using prototype Class object
and after playing it for a while, I saw that I need to use the "with"
keyword in the class members,
so I can access its members

here is the relevant part of the class : (the member is "_div")

var JSClass = Class.create ({
     initialize: function(initParams) {

        if (initParams.div)
            *this*._div = $(initParams.div);
            *this*._div = new Element(div);
     // an example of a member function
    setComment: function(msg)
*        {*
*              *_div.innerHTML = msg;
*        }*

is there a way that I can get rid of all these usages of "this"


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-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to