Here is an example http://jsbin.com/eyapo3/2/edit
On 26 май, 23:27, buda www...@pochta.ru wrote:
One thing is stay for me unconvinient is calling private functions in
public functions.
It's nessety to call them with .bind(this)(...)
function publicFunc1(){
...
_private_prop1 = 45;
Hi,
One thing is stay for me unconvinient is calling private functions in
public functions.
It's nessety to call them with .bind(this)(...)
No, that's a very inefficient way to call them. Instead:
_privateFunction.call(this, arg1, arg2);
or
_privateFunction.apply(this, array_of_args);
Thanks! your articles are very useful!
On 27 май, 12:43, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
One thing is stay for me unconvinient is calling private functions in
public functions.
It's nessety to call them with .bind(this)(...)
No, that's a very inefficient way to call
I use to do
var Class1 = Class.create({
...
});
Object.extend(Class1, {
staticProp: '',
staticMeth: function(){...}
})
var Class2 = Class.create(Class1, {
});
Object.extend(Class2, {
staticProp: '',
staticMeth: function(){...}
})
Is there a way to inheritate staticProp and
T.J. could you provide what do you mean in scheme code, please
Thanks
On 27 май, 15:43, T.J. Crowder t...@crowdersoftware.com wrote:
Hi,
Is there a way to inheritate staticProp and staticMeth in inherited
classes automatically?
Not built into `Class.create`, no. You could readily create
I have a form with a select box and a text input. When I select an
item in the select list the page make an ajax call request to a php
script that returns rows from mysql.
I am able to add items to the db by entering a value in the text input
and hitting submit.
The problem is I want the
Hi,
Not sure what you mean by scheme code, but I'm just talking about a
simple `for..in` loop. Off-the-cuff:
function createClass(superClass) {
var cls, name, value;
cls = Class.create.apply(Class, arguments);
// Is there a superclass?
if (Object.isFunction(superClass))
{