After reading a good book I found for myself a mthod to have private
members in Class
Here is the pattern

var myClass = Class.create((function(){
  var
   _private_prop1,
  _private_prop2,
  public_prop;

  function _privateFunc1(){ ... }
  function _privateFunc2(){ ... }

  function publicFunc1(){ ... }
  function publicFunc2(){ ... }

  return{
    public_prop: public_prop,
    publicFunc1: publicFunc1,
    publicFunc2: publicFunc2
  };
}()));

-- 
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 [email protected].
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