carlw
10/04/2018, 3:12 PMamanda.hinchman-dominguez
10/04/2018, 3:22 PMamanda.hinchman-dominguez
10/04/2018, 3:24 PMamanda.hinchman-dominguez
10/04/2018, 3:27 PMamanda.hinchman-dominguez
10/04/2018, 3:35 PMcarlw
10/04/2018, 3:41 PMnimakro
10/04/2018, 4:02 PMnimakro
10/04/2018, 4:09 PMthomasnield
10/04/2018, 4:25 PMamanda.hinchman-dominguez
10/04/2018, 4:26 PMnimakro
10/04/2018, 4:30 PMnimakro
10/04/2018, 4:32 PMcarlw
10/04/2018, 4:33 PMedvin
10/04/2018, 4:52 PMedvin
10/04/2018, 4:52 PMedvin
10/04/2018, 5:05 PMamanda.hinchman-dominguez
10/04/2018, 5:07 PMedvin
10/04/2018, 5:08 PMcarlw
10/04/2018, 5:26 PMnimakro
10/04/2018, 6:12 PMnimakro
10/04/2018, 6:13 PMthomasnield
10/04/2018, 6:33 PMcarlw
10/04/2018, 6:33 PMthomasnield
10/04/2018, 8:55 PMValV
10/05/2018, 1:14 AMsubscribe<MyEvent<String>>
, but from the other place cast fire(MyEvent<Integer>())
, should not that first subscribe filter only events with parameter type String
?ValV
10/05/2018, 1:18 AMinline fun <reified T : FXEvent> subscribe
sees only T
of type MyEvent
, right?ValV
10/05/2018, 1:20 AMAny
?elexx
10/05/2018, 5:34 AMT
is MyEvent
. Any
is just the upper bound if you didn't specify one, like so: class MyEvent<out T : Number>(val param: T) : FXEvent()
and subscribe with subscribe<MyEvent<Number>>
. But I guess there is no benefit to just declaring the event class like class MyEvent(val param: Number) : FXEvent()
ValV
10/05/2018, 6:08 AMclass MyEvent(val param: Any) : FXEvent()
, but only in case, where we don't need to determine type of param
, or am I wrong? If I just do so, then I guess that I can't further when (param) { is String -> ...; Integer -> ...; else -> ... }