elect
02/14/2018, 8:09 PMx is what I need to findShawn
02/14/2018, 8:11 PMx is, or is x determined at runtime or something similarly funky?Shawn
02/14/2018, 8:12 PMStructure.convertCamera?elect
02/14/2018, 8:12 PMShawn
02/14/2018, 8:12 PMelect
02/14/2018, 8:17 PMShawn
02/14/2018, 8:18 PMelect
02/14/2018, 8:19 PMShawn
02/14/2018, 8:19 PMShawn
02/14/2018, 8:20 PMelect
02/14/2018, 8:21 PMShawn
02/14/2018, 8:24 PMelect
02/14/2018, 8:25 PMShawn
02/14/2018, 8:25 PMelect
02/14/2018, 8:25 PMelect
02/14/2018, 8:26 PMShawn
02/14/2018, 8:26 PMelect
02/14/2018, 8:26 PMShawn
02/14/2018, 8:27 PMShawn
02/14/2018, 8:31 PMShawn
02/14/2018, 8:31 PMMutableMap<String, Pair<() -> Camera, Structure.(KMutableProperty0<Camera>) -> Unit>>elect
02/14/2018, 8:32 PMelect
02/14/2018, 8:33 PMCamera works, but I'd like to get a generic ElemBaseShawn
02/14/2018, 8:33 PMStructure is too specific, you might be able to use a superclass or interface instead, but what you can’t avoid is including a receiver type there since Structure::convertCamera is a member function and implicitly always includes a reference to the class it belongs toShawn
02/14/2018, 8:33 PMShawn
02/14/2018, 8:34 PMShawn
02/14/2018, 8:34 PMShawn
02/14/2018, 8:34 PMconvertCamera explicitly takes in KMutableProperty0<Camera>, then I don’t think you can pass in a supertypeelect
02/14/2018, 8:35 PMelect
02/14/2018, 8:35 PMvar and looked at its typeelect
02/14/2018, 8:36 PMKFunction0 and KFunction2 that I do not have available... wtf?elect
02/14/2018, 8:36 PMKFunction..Shawn
02/14/2018, 8:36 PMShawn
02/14/2018, 8:36 PMShawn
02/14/2018, 8:36 PMKFunction... are all in kotlin.reflectShawn
02/14/2018, 8:37 PMelect
02/14/2018, 8:37 PMelect
02/14/2018, 8:39 PMShawn
02/14/2018, 8:39 PMimport kotlin.reflect.KFunction0 and import kotlin.reflect.KFunction2Shawn
02/14/2018, 8:40 PM() -> ElemBase and (Structure, KMutableProperty0<Camera>) -> UnitShawn
02/14/2018, 8:40 PMStructure.(KMutableProperty0<Camera>) -> Unitelect
02/14/2018, 8:40 PMShawn
02/14/2018, 8:40 PMelect
02/14/2018, 8:40 PMelect
02/14/2018, 8:40 PMShawn
02/14/2018, 8:40 PMShawn
02/14/2018, 8:41 PMkotlin-stdlib-* again?elect
02/14/2018, 8:45 PMelect
02/14/2018, 8:45 PMShawn
02/14/2018, 8:48 PM() at the end of your type annotation?elect
02/14/2018, 8:48 PMShawn
02/14/2018, 8:48 PMelect
02/14/2018, 8:49 PM>elect
02/14/2018, 8:49 PMval converters = mutableMapOf<String, Pair<KFunction0<Camera>, KFunction2<Structure, KMutableProperty0<Camera>, Unit>>>() did itelect
02/14/2018, 8:50 PMElemBase versionelect
02/14/2018, 8:50 PMelect
02/14/2018, 8:53 PMElemBase turned red..elect
02/14/2018, 8:53 PM