Tomas Kormanak
12/22/2021, 10:15 AMinterface Container
returns Container? I can't see any usecase where it could be useful and I don't think it's a good pattern (fluent interface). I think they should return Unit
The only case I can imagine return something else is method add. It can return added component to support this shortcut:
val mycomponent = add(MyComponent())
Tomas Kormanak
12/22/2021, 10:20 AMSimplePanel().add(x).add(y).add(z)
But I think KVision should not allow it in favor of this:
SimplePanel().apply {
add(x)
add(y)
add(z)
}
Robert Jaros
12/22/2021, 10:22 AMTomas Kormanak
12/22/2021, 10:22 AMRobert Jaros
12/22/2021, 10:24 AMTomas Kormanak
12/22/2021, 10:24 AMTomas Kormanak
12/22/2021, 10:32 AMRobert Jaros
12/22/2021, 10:41 AMRobert Jaros
12/03/2022, 3:15 PM