Hi!
This works for me:
class Demo {
def demo() {
new TableView<Person> => [
columns += new TableColumn<Person, String>("First Name") => [
cellValueFactory = new PropertyValueFactory<Person, String>("firstName")
]
]
}
}
class TableView<T> {
public List<TableColumn<T, String>> columns
}
class Person {
}
class TableColumn<P, S> {
new (S s) {
}
public PropertyValueFactory<P,S> cellValueFactory
}
class PropertyValueFactory<P, S> {
new(S s) {
}
}
Maybe you have other field named cellValueFactory in your current
("Demo") class and it is used instead of the one in TableColumn? Try
prefixing the fields with "it."
regards,
Vlad