I read and understand a lot of russian but I'd rather not try to write it.
Hope answer in english will be of any help to you.
To have private functions and properties you need to use clousure like this:
var AClass = Class.create((function()
{
var _stat = 'I am static private';
function initialize()
{
this.test = 'I am private';
}
function _priv()
{
console.log(this.test);
}
function _private()
{
console.log(_stat);
}
return {
initialize: initialize,
pub: function()
{
_priv.apply(this);
},
publi: function()
{
_private();
},
setpubli: function()
{
_stat = 'after set';
}
};
})());
document.observe("dom:loaded", function()
{
var a = new AClass();
a.pub();
a.publi();
a.setpubli();
var b = new AClass();
b.publi();
});
Inheritance:
var ASubClass = Class.create(AClass, (function()
{
function initialize($super)
{
$super($A(arguments));
}
return {
initialize: initialize,
pfun: function()
{
console.log('in sub ');
}
};
})());
There is much more to explore on this subject.
Have fun
> О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫
> var myClass=Class.create (
> initialize :function(){} ,
> action:function () {}
> )
> О©╫О©╫О©╫О©╫О©╫ action О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫(О©╫ О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫)...О©╫ О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫О©╫ О©╫О©╫О©╫О©╫О©╫
> --
> You received this message because you are subscribed to the Google
> Groups "Prototype &
script.aculo.us" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/prototype-scriptaculous/-/s5jE0forsHgJ.
> To post to this group, send email to
>
prototype-s...@googlegroups.com.
> To unsubscribe from this group, send email to
>
prototype-scripta...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/prototype-scriptaculous?hl=en.