class instance interface abstract-class extends implements private protected public static const constructor super read-only friendly-method event |
StaticMethods and attributes can be static in ZNOW. To declare a property as static, have to add "static." to the property name. var ClassA=Class({
'static.total':function(){
//public static method
return ClassA._count;
},
'static._count':0, //private static attribute
init:function(){
ClassA._count++; //accessing a private static property
}
});
Static properties are declared inside the class body. It is to improve the readability. |