On 13 Okt., 18:05, buda www...@pochta.ru wrote:
I need to create class which is inhereted from enumerable module,
sortable class and observable class
Is it possible in one operation call?
Just use Object.extend()
var MyClass = Class.create();
Object.extend(MyClass.prototype, Enumerable);
Hi,
On Oct 20, 3:33 am, buda www...@pochta.ru wrote:
T.J. here is the example of using instance private vaiables store in use
-http://jsfiddle.net/QW8vM/17/
FWIW, that code refers to an undefined symbol `_items` in the property
getter function. Also note that it has a memory leak: `destroy`
Hi!
Thanks for response.
`_items` - it's typo ;) of course there mightbe - return _privates[this.
internalId].items.slice(0);
I agree with you about error in destroy - not deleting an instance item in
_privates array.
About not using such pattern - I agree if only few methods need to access
On Oct 21, 2:03 pm, buda www...@pochta.ru wrote:
About not using such pattern - I agree if only few methods need to access
_privates, but what if an object has about 10 or more methods that
manipulate _privates!? make them all per instance?
It depends entirely on how many instances you expect