tornadofx / tornadofx / Component / get

get

inline fun <reified InjectableType, T> get(prop: KProperty1<InjectableType, T>): T where InjectableType : Component, InjectableType : ScopedInstance

Find the given property inside the given ScopedInstance. Useful for assigning a property from a View or Controller in any Component. Example:

val person = find(UserController::currentPerson)