1
是否有可能在JavaFX类上创建带有参数的构造函数?带有JavaFX参数的构造函数?
这可以在Java中通过以下方式实现:
MyObj(String foo, String bar) {
// ...
}
这是可能的JavaFX的?
即
// creating an Object Literal without the specified arguments must result in compile error
var myObj = MyObj {} ;
// While this should not result in compile error
var myObj2 = MyObj {foo: "foo", bar: "bar"};
这样做会导致编译错误 – 2010-09-15 17:04:44