John Aoussou
12/30/2023, 2:04 PMval textState = remember { mutableStateOf(TextFieldValue()) }
TextField(
value = textState.value,
onValueChange = {
textState.value = it
}
)
With the following error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Parameter specified as non-null is null: method androidx.compose.ui.platform.PlatformInput$methodRequestsForInput$1.getTextLocation, parameter offset
Alexander Maryanovsky
12/30/2023, 2:10 PMJohn Aoussou
12/30/2023, 2:18 PMIntelliJ IDEA 2023.3.2 (Community Edition)
Build #IC-233.13135.103, built on December 20, 2023
Runtime version: 17.0.9+7-b1087.9 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.0-91-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 3994M
Cores: 4
Registry:
ide.experimental.ui=true
Kotlin: 233.13135.103-IJ
Current Desktop: ubuntu:GNOME
John Aoussou
12/30/2023, 2:18 PMimport org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm")
id("org.jetbrains.compose")
}
group = "com.example"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
google()
}
dependencies {
// Note, if you develop a library, you should use compose.desktop.common.
// compose.desktop.currentOs should be used in launcher-sourceSet
// (in a separate module for demo project and in testMain).
// With compose.desktop.common you will also lose @Preview functionality
implementation(compose.desktop.currentOs)
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "debugTextField"
packageVersion = "1.0.0"
}
}
}
John Aoussou
12/30/2023, 2:19 PMorg.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
kotlin.code.style=official
kotlin.version=1.9.20
compose.version=1.5.10
John Aoussou
12/30/2023, 2:19 PMpluginManagement {
repositories {
gradlePluginPortal()
maven("<https://maven.pkg.jetbrains.space/public/p/compose/dev>")
}
plugins {
kotlin("jvm").version(extra["kotlin.version"] as String)
id("org.jetbrains.compose").version(extra["compose.version"] as String)
}
}
rootProject.name = "debugTextField"
Alexander Maryanovsky
12/30/2023, 2:22 PMJohn Aoussou
12/30/2023, 2:22 PMAlexander Maryanovsky
12/30/2023, 2:27 PMAlexander Maryanovsky
12/30/2023, 2:27 PMJohn Aoussou
12/30/2023, 2:28 PMAlexander Maryanovsky
12/30/2023, 2:28 PMJohn Aoussou
12/30/2023, 2:29 PMAlexander Maryanovsky
12/30/2023, 2:29 PMJohn Aoussou
12/30/2023, 2:29 PMAlexander Maryanovsky
12/30/2023, 2:30 PMprintln("${System.getProperty("java.version")}")
John Aoussou
12/30/2023, 2:31 PM> Task :compileJava NO-SOURCE
> Task :classes UP-TO-DATE
> Task :jar
> Task :run
17.0.9
Alexander Maryanovsky
12/30/2023, 2:32 PMAlexander Maryanovsky
12/30/2023, 2:34 PMJohn Aoussou
12/30/2023, 2:39 PMJohn Aoussou
12/30/2023, 2:40 PMAny unusual input settings?For example? Like accents/non latin letters? (no)
John Aoussou
12/30/2023, 2:40 PMAnyway, I’ll fix it…Please do let me know if you need any additional information.
Alexander Maryanovsky
12/30/2023, 2:40 PMAlexander Maryanovsky
12/30/2023, 2:41 PMAlexander Maryanovsky
12/30/2023, 2:44 PMJohn Aoussou
12/30/2023, 2:47 PMJohn Aoussou
12/30/2023, 3:41 PMAlexander Maryanovsky
12/30/2023, 4:32 PM-Xno-param-assertions
compiler flag, but you would need to recompile compose itself, which isn’t trivial.Alexander Maryanovsky
12/30/2023, 4:43 PMAlexander Maryanovsky
12/30/2023, 4:44 PMJohn Aoussou
12/31/2023, 2:53 AMAlexander Maryanovsky
01/12/2024, 3:15 PMJohn Aoussou
01/13/2024, 10:23 AMJohn Aoussou
01/13/2024, 10:24 AMAlexander Maryanovsky
01/13/2024, 10:36 AM