melatonina
12/04/2020, 12:16 PMimport kotlinx.coroutines.*
import androidx.compose.desktop.*
import androidx.compose.material.*
import androidx.compose.runtime.*
fun main(args: Array<String>) = runBlocking {
val javaFxJob = GlobalScope.launch {
launch<HelloWorld>(args)
}
val composeDesktopJob = GlobalScope.launch {
Window {
var text by remember { mutableStateOf("Hello, World!") }
MaterialTheme {
Button(onClick = {
text = "Hello, Desktop!"
}) {
Text(text)
}
}
}
}
javaFxJob.join()
composeDesktopJob.join()
}
I'm getting crashes half of the time, unless I separate the startups of the two toolkits with a delay()
, so I guess there is something wrong. Otherwise it seems to work. This happens with both 0.3.0-build133 and 0.2.0-build132.Igor Demin
12/04/2020, 3:49 PMmelatonina
12/04/2020, 6:05 PMmelatonina
12/04/2020, 9:41 PMmelatonina
12/04/2020, 9:42 PMmelatonina
12/04/2020, 9:42 PMIgor Demin
12/05/2020, 9:09 AMmelatonina
01/14/2021, 8:01 PMIgor Demin
01/14/2021, 8:30 PMmelatonina
01/14/2021, 8:36 PM