altavir
04/18/2018, 12:39 PMlazyPolulate
for tree view and a bit confused. By default leafCheck: (LazyTreeItem<T>) -> Boolean = { it.hasChildren() }
which means it should return true
on nodes and false
on leaves. The implementation on the contrary expects it to be false
on nodes.
I have and object, that can generate its children lazily and also check if there are children. And the same goes for its children. When I write
lazyPopulate( leafCheck = { it.value.hasChildren }) {
it.value.children
}
I all top level nodes as leafs, but when I flip it.value.hasChildren
, I get top level nodes as nodes, but second level nodes as leafs. What is wrong?