Brendan Campbell-hartzell
06/03/2021, 7:06 PMBrendan Campbell-hartzell
06/03/2021, 7:08 PMRoukanken
06/03/2021, 7:46 PMvar IComponent.description: String
within GUIUpdate
(also, might be better to call it GuiUpdate)
Which probably isnt a maintanable model, as GuiUpdate will get bloated
Currently, Kotlin differs between "implicit" (this) and "explicit" (stuff before .
) recievers - and if you specify explicit reciever, then it cannot mean an implicit one in definition - so the vm.description
can only call:
a) stuff without reciever defined in IComponent
b) stuff that has IComponent as explicit receiver in definition
And yes, this would most likely be easier with multiple recievers, as smth like
interface IComponent : ViewModel {
@with(GuiUpdate)
var description: String
}
Would likely work exactly as you want to. (I'm making a lot of assumptions there tho)Brendan Campbell-hartzell
06/03/2021, 7:49 PMwith,
apply
, or run
, but it isn't as discoverable on the client side.