~`onExternalDrag()` has been deprecated and doesn...
# compose-desktop
s
onExternalDrag()
has been deprecated and doesn't even compile anymore.
The sample at https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-drag-drop.html#creating-a-drop-target seems already be outdated, because for me it does not compile. Is there a working sample (for the current CMP version) how I can drag & drop files from the system into my application window? Seems to be an Kotlin 2.1.0 issue, which is not really compatible with CMP 1.7.1
a
Not sure I understand what you’re asking about.
The example seems to work for me with
Copy code
kotlin.version=2.1.0
compose.version=1.7.1
s
With Kotlin 2.1.0 it does not work for me. 🤷‍♂️ The DragAndDropEvent has no fields as shown in the screenshot. With Kotlin 2.0.21 it works and the imports are suggested.
a
Maybe a problem with the IDE? What if you add the import manually?
s
I am on IDEA ultimate 2024.2.5 as 2024.3.x does not work properly on Mac M1
I did not try to add the import manually because I rely on IDEA suggestions here. The sample could need the imports added btw.