Adam K
02/15/2018, 12:32 AMqwert_ukg
02/15/2018, 4:50 AMspand
02/15/2018, 12:55 PMinterface Tooltipable : FlowContent {
fun Tag.withTooltip(block: FlowContent.() -> Unit)
fun Tag.tooltipBox(content: FlowContent.() -> Unit) {
(this@tooltipBox).withTooltip{
div(classes = "tooltip-box",block = content)
}
}
}
Error:(11, 9) Kotlin: 'fun Tag.withTooltip(block: FlowContent.() -> Unit): Unit' can't be called in this context by implicit receiver. Use the explicit one if necessary
frogger
02/15/2018, 1:13 PMMyClass::class.java.simpleName
. I want to setup a logger for my kotlin file (no classes inside), can I get the FQN of the kotlin file somehow? e.g. com.example.stuff.UtilitiesKt
?diesieben07
02/15/2018, 1:20 PMdiesieben07
02/15/2018, 2:17 PMthing::class.java == ElemBase::class.java
(or pure ::class
if you are not on JVM).jkbbwr
02/15/2018, 2:28 PMlateinit
forces var, which is bad imo.
lazy
will cause exceptions if the property is accessed out of order (Im leaning towards this for logical reasons)
notNull
can't be assigned over so same as lateinitSnowmanX95
02/15/2018, 6:32 PMszymen
02/15/2018, 11:48 PMShow kotlin bytecode -> Decompile
gives a different result than running kotlin code?groostav
02/16/2018, 12:26 AMeventBus.unregister
, which is difficult. so you're likely to spring a memory leak.dumptruckman
02/16/2018, 1:55 AMjtonic
02/16/2018, 6:19 AMReadOnlyProperty<in R, out T> where where T : @Component Any
?diesieben07
02/16/2018, 1:14 PMinline
factory method with reified
type parameter?diesieben07
02/16/2018, 1:20 PMzvozin
02/16/2018, 5:17 PMdata class
, is there?sxtanna
02/17/2018, 12:34 AMjava
source roots for my Kotlin only projects?Shawn
02/17/2018, 2:43 AMkarelpeeters
02/17/2018, 8:28 AMSlackbot
02/17/2018, 12:58 PMmwerschy
02/17/2018, 6:32 PMtipsy
02/18/2018, 1:40 AMkevinmost
02/18/2018, 3:02 AMyatsinar
02/18/2018, 11:22 AMjw
02/18/2018, 4:41 PMczuckie
02/19/2018, 8:08 AMAndreas Sinz
02/19/2018, 11:32 AMinterface FooTags {
fun getTags(): Map<String, Int>
}
class FooTagsRetriever : FooTags {
override fun getTags(): Map<String, Int> {
//Get Tags via HTTP
}
}
class FooTagsCache(private val retriever: FooTags): FooTags {
private lateinit var tagCache: Map<String, Int>
override fun getTags(): Map<String, Int> {
If(!::tagCache.isInitialized) {
tagCache = retriever.getTags())
}
return tagCache
}
Then you have transparent caching and can easily test every part in isolationfred.deschenes
02/19/2018, 2:25 PMviliusk
02/19/2018, 3:22 PMcollections
.filter { it.conditionA }
.filter { it.conditionB }
.filter { it.conditionC }
performing same as
collections
.filter { it.conditionA || it.conditionB || it.conditionC }
?
I wonder if 1st block will be 3x times slower or not?r4zzz4k
02/19/2018, 3:25 PMarekolek
02/19/2018, 3:26 PMarekolek
02/19/2018, 3:26 PMmp
02/20/2018, 10:43 AMarekolek
02/20/2018, 11:38 AMmp
02/20/2018, 12:21 PMnkiesel
02/21/2018, 3:18 AM&&
and not ||