actor

inline fun <S, A : Actor> KWidget<S>.actor(actor: A, init: A.(S) -> Unit = {}): A

Utility function for adding existing actors to the group with a type-safe builder init block. Mostly for internal use.

Return

the passed actor.

Parameters

actor

will be added to the group.

init

will be invoked on the actor, consuming actor storage object (usually a Cell, Node or the actor itself, if the group does not keep the actors in a dedicated storage object).

S

storage type.

A

actor type.