Vladyslav Sitalo
08/20/2018, 12:16 PMclass Foo(val Bar: String, val Fizz: String = "Buzz")
then when I do ::Foo, I’d get a reference to a 2 argument constructor (as it’s considered primary
, as I understand), is there a way for me to get a reference to the constructor with 1 argument (besides e.g. getting all constructors and filtering them on that criteria)?Ayden
08/21/2018, 3:27 PMval a = 5
val b = 5.4
val c = 5.4321
Thanos Psaridis
08/22/2018, 8:48 AMmaxmello
08/22/2018, 10:36 AMAyden
08/22/2018, 12:22 PMinline fun <T, R> with(receiver: T, block: T.() -> R): R (source)
I don't really understand what is this trying to explain although I have read through the explanation.
I know T
might stands for Type
but what does R
stands for? Run?
The receiver
is the argument we pass into it?
What is block
?
R
i would assume it is the result then.
Am I right?stachu540
08/23/2018, 7:04 AMString
into Kotlin-code without using kotlinc
or something existing simmilar. I want use to my project. Better would be a dependency or something.david-wg2
08/28/2018, 12:38 PMkotlin-stdlib-jdk8
be ?gabrielfv
08/28/2018, 7:46 PMprivate val dashItemInterface: DashItemInterface = object : DashItemInterface {
override fun onClick(item: DashItem) {
item.foo()
}
}
The IDE suggests to convert it to a lambda, however when I set it like that:
private val dashItemInferface: DashItemInterface = { item: DashItem -> item.foo() }
It signals as a type mismatch, saying it was expecting an instance of an implementation of the interface rather than a (DashItem) -> Unit
. Am I doing it wrong somehow?Hullaballoonatic
08/29/2018, 6:43 PMAyden
08/30/2018, 6:28 AM->
in lamdas as return?otakusenpai
08/31/2018, 9:43 AMmuralimohan962
09/02/2018, 5:40 AMmattray
09/02/2018, 9:16 PModay
09/03/2018, 2:49 PMtodd.ginsberg
09/03/2018, 2:59 PMdrfidel
09/03/2018, 3:20 PModay
09/03/2018, 3:27 PMPavan Kuppa
09/06/2018, 11:33 AMaglassman
09/07/2018, 3:07 PMHullaballoonatic
09/08/2018, 5:37 PMValV
09/09/2018, 3:54 AMimport tornadofx.*
class MyClass {
var myObservableProperty = SimpleStringProperty()
var myObservable by myObservableProperty
}
and
val myClass = MyClass()
val property = myClass.myObservableProperty
myClass.myObservable = "New data"
println(myClass.myObservable)
Yeah, I love Kotlin 😃karelpeeters
09/09/2018, 9:35 PMvar mainCount = 0
mainCount++
thread {
while( true ) {
println(mainCount)
Thread.sleep(1000)
}
}
could work without reference too, but the compiler generates it anyway.poohbar
09/10/2018, 1:37 PMcheck
that would take a supplier lambda for the case when the check passes?Hullaballoonatic
09/10/2018, 11:43 PMval bb = terrain!![posRed + 1] and 0xff.toByte()
val gg = terrain[posRed + 2] and 0xff.toByte()
val rr = terrain[posRed + 3] and 0xff.toByte()
g.color = Color(rr.toInt(), gg.toInt(), bb.toInt())
karelpeeters
09/11/2018, 4:38 PMto
is a factory function for pairs, there's no inherent connection to maps.ValV
09/11/2018, 5:01 PMmaven-jar-plugin
configuration to generate MANIFEST.MF file with Main-Class
entry, it does but with no success - TornadoFX app class is inherited from Application
and has no static main
methodHullaballoonatic
09/11/2018, 9:54 PMHullaballoonatic
09/11/2018, 10:37 PMhashCode()
for a class whenever i override equals()
? I don't even know what the former doesHullaballoonatic
09/11/2018, 10:39 PMNikky
09/11/2018, 11:14 PMto
operates on parametrized types.. so that might be a example from the stblib you want to look atNikky
09/11/2018, 11:14 PMto
operates on parametrized types.. so that might be a example from the stblib you want to look atHullaballoonatic
09/11/2018, 11:42 PM