https://kotlinlang.org
Join Slack
Hi! I am new to Desktop Compose and was just trying a small Hello World! I just created a small ap...
m

Melchior Grutzmann

over 1 year ago
Hi! I am new to Desktop Compose and was just trying a small Hello World! I just created a small app set up via File > New Project > Desktop Compose (which I assume comes from the Android plugin). However, when I run the app under macOS, then it fails with an error:
WARNING: Secure coding is not enabled for restorable state! Enable secure coding by implementing NSApplicationDelegate.applicationSupportsSecureRestorableState: and returning YES.
I have 2 questions: 1) What is the development level of Desktop Compose (for MacOS), is it still alpha? 2) How do I fix the above problem: Gemini suggests to implement
MyApplication
that implements the
NSApplicationDelegate
but when I copy this code into the src/main/kotlin/Main.kt, the
NSApplication
and
NSApplicationDelegate
are unknown and there is no suggestion from where to import them. The generated project uses "org.jetbrains.compose.uidesktop ui1.6.10". (Please let me know if I should post the generated code. I am using IntelliJ Ultimate 2024.1.2 on arm64 MacOS.) Thanks for suggestions Melchior
✅ 1
m
k
p
  • 3
  • 8
  • 333
The documentation states that the Ktor Client follows redirects by default: <https://ktor.io/docs/ht...
r

ribesg

almost 2 years ago
The documentation states that the Ktor Client follows redirects by default: https://ktor.io/docs/http-redirect.html But on receiving HTTP 307 status code from my API I get
io.ktor.client.plugins.RedirectResponseException: Unhandled redirect
. So which is supposed to be right? What am I supposed to do if
followRedirects
is already true?
r
e
  • 2
  • 4
  • 333
Is there an .editorconfig equivalent of the Code Style → Kotlin → Packages to Use Import with '*' se...
s

sindrenm

almost 3 years ago
Is there an .editorconfig equivalent of the Code Style → Kotlin → Packages to Use Import with '*' setting? Setting it and then exporting to .editorconfig puts the newly set value to the
ij_kotlin_packages_to_use_import_on_demand
config, but setting that value does not seem to have the same effect as the IDEA setting.
s
  • 1
  • 1
  • 333
Hello everyone, is it possible to use ktor client for gRPC/protobuf and KMM (iOS/Android)? If someo...
o

Omar Habash

almost 4 years ago
Hello everyone, is it possible to use ktor client for gRPC/protobuf and KMM (iOS/Android)? If someone could point me to a sample project/guide/docs that'd be great!
o
a
+2
  • 4
  • 10
  • 333
Is it reasonable to have a `@Composable` function with return type? I am trying to evaluate the feas...
c

chao

over 4 years ago
Is it reasonable to have a
@Composable
function with return type? I am trying to evaluate the feasibility to write JVM unit tests for them:
@Composable
fun spanStyleRange(textAttribute: TextAttribute): AnnotatedString.Range<SpanStyle> {
    val spanStyle: SpanStyle = when (textAttribute.type) {
        TextAttributeType.HASHTAG ->
            SpanStyle(color = MaterialTheme.colors.primary, fontWeight = FontWeight.Bold)
        else -> SpanStyle()
    }
    return AnnotatedString.Range(
        item = spanStyle,
        start = textAttribute.start,
        end = textAttribute.start + textAttribute.length
    )
}
In thie example,
spanStyleRange
need to be annotated with
@Composable
because it is using
MaterialTheme.colors
c
d
a
  • 3
  • 11
  • 333
For those who want BuildConfig for Kotlin MPP. I'm currently working on this <https://github.com/ysh...
y

yshrsmz

almost 7 years ago
For those who want BuildConfig for Kotlin MPP. I'm currently working on this https://github.com/yshrsmz/BuildKonfig
👍 4
💯 4
y
d
+3
  • 5
  • 8
  • 333
Is there a kotlin mpp implementation of gzip?
p

Paul Woitaschek

about 5 years ago
Is there a kotlin mpp implementation of gzip?
p
b
+2
  • 4
  • 3
  • 333
Are there alternatives to using the spread (`*`) operator when dynamically building a list to call a...
j

Joe

over 6 years ago
Are there alternatives to using the spread (
*
) operator when dynamically building a list to call a varargs method with? or is the detekt
SpreadOperator
rule just there to make sure there's awareness of the performance implications of doing so?
j
s
t
  • 3
  • 3
  • 333
is there a good equivalent of a "multiset" in Kotlin? I don't care about order. I simply care about ...
a

Andrew Gazelka

almost 7 years ago
is there a good equivalent of a "multiset" in Kotlin? I don't care about order. I simply care about element count and I want to compare equality between to multisets.
a
t
+2
  • 4
  • 10
  • 333
Cannot query the value of this provider because it has no value available. I cannot build via XCode
h

Hristijan

about 1 year ago
Cannot query the value of this provider because it has no value available. I cannot build via XCode
h
  • 1
  • 2
  • 332
Previous208209210Next

kotlinlang

A modern programming language that makes developers happier.

Powered by