Dear Prototypers,
I've been using the following technique for separating private and
public methods/variables in a class declaration.

---
Object.extend(myclass.prototype, function() {
        //private variables
        var attr1;
        var attr2;
        ...
        //private methods
        function meth1 () {}
        function meth2 () {}
        ...

        return {
                //public methods
                pub_meth1: function() {},
                pub_meth2: function() {}
        }
}());
---

I'm wondering if this is a good practice. Are there any insights that
i should be aware of? Are the private methods/functions being
duplicated for each of myclass instance?

Thanks in advance

--
mona
[EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to