carlw
06/26/2018, 6:07 PMRuckus
06/26/2018, 6:08 PMcarlw
06/26/2018, 6:09 PMRuckus
06/26/2018, 6:12 PM(T) -> Iterable<T>?
. The only change to make this work would be to change the line val children = childFactory.invoke(item)
to val children = childFactory.invoke(item.value)
.carlw
06/26/2018, 6:12 PMorangy
Ruckus
06/26/2018, 6:13 PMorangy
bindTree(modelProperty,
{
TreeItem(it).apply { isExpanded = true }
},
{
(it as? ContainerItem)?.children
}
)
And it binds stuff, initializes, etcorangy
Ruckus
06/26/2018, 6:14 PMitemFactory
wouldn't default to ::TreeItem
.orangy
bindTree
is as simple as source.attach { root = create(it, itemFactory, children) }
with the attach function aboveorangy
create
is pretty much populate with the change to childrenFactoryorangy
amanda.hinchman-dominguez
06/26/2018, 6:22 PMamanda.hinchman-dominguez
06/26/2018, 6:22 PMorangy
Ruckus
06/26/2018, 6:25 PM@JvmName
where possible, otherwise we'll add a new function with a different name.Ruckus
06/26/2018, 6:30 PMorangy
orangy
Ruckus
06/26/2018, 6:34 PMRuckus
06/26/2018, 6:35 PMRuckus
06/26/2018, 6:37 PMiLobanov
06/26/2018, 6:46 PMiLobanov
06/26/2018, 6:47 PMcarlw
06/26/2018, 6:57 PMiLobanov
06/26/2018, 7:00 PMiLobanov
06/27/2018, 5:01 AMiLobanov
06/27/2018, 5:11 AMron
06/27/2018, 6:40 AM