Re: [Proto-Scripty] как создавать в классе правильно частные и публичные методы и свойства

2013-01-07 Thread Wojtek Zadora
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

Re: [Proto-Scripty] как создавать в классе правильно частные и публичные методы и свойства

2013-01-07 Thread Wojtek Zadora
Sorry, one not so small mistake: should be function initialize() { this.test = 'I am public'; } this is public of course 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

Re: [Proto-Scripty] как создавать в классе правильно частные и публичные методы и свойства

2013-01-07 Thread Александр Павленко
а вот так var myClass= Class.create( { initialize:function(str) { this.str=str ; this.msg=function() {alert (privat+this.str);} } , public:function() {alert (public+this.str)} } ) метод msg приватный или нет -- You

Re: [Proto-Scripty] как создавать в классе правильно частные и публичные методы и свойства

2013-01-07 Thread fntzr
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)} } )

Re: [Proto-Scripty] как создавать в классе правильно частные и публичные методы и свойства

2013-01-07 Thread Александр Павленко
понедельник, 7 января 2013 г., 20:59:28 UTC+2 пользователь mikhail написал: No, this method `msg` is public. But if you create var myClass= Class.create( { initialize:function(str) { this.str=str ; msg=function() {alert