No support for static functions, variables and constants
I have already made a comment under post on this point but I would like to make it crystal clear.
There IS support for static members in JavaFX Script. Thats true - there is no "static" key word build in the language, but still you can make function or field static. We just have to put it inside class file but outside class declaration.
I.E.
public class MyClass{ public function memberFunction(){ } } public function staticFunction(){ } var staticVar; def STATIC_CONST;
and thats it. You can call/access them with:
MyClass.staticFunction(); MyClass.staticVar; MyClass.STATIC_CONST;It is that easy! maybe not to intuitive for Java developers but still it is not so bad idea - I like it. Do you ?
Brak komentarzy:
Prześlij komentarz