No, this method `msg` is public.

But if you create

var myClass= Class.create(
    {  initialize:function(str)
        {   this.str=str ;
            msg=function()
                {alert ("privat"+this.str);}
        } ,
       public:function()
            {alert ("public"+this.str)}
    }
  )

then `msg` is private. All method that your add to `this` will be public.
For creating private methods use that was advised or agreements (for example: all private methods started with __ -> __private_method, public_method).

--
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