I'm confused right now... After updating to the la...
# compose-desktop
s
I'm confused right now... After updating to the latest compose-jb build the deprecated
imageResource
and
vectorXmlResource
are removed... But this sample code still uses that: https://github.com/JetBrains/compose-jb/blob/master/examples/widgets-gallery/commo[…]kotlin/org/jetbrains/compose/demo/widgets/platform/Resources.kt How to replace it? Edit: Oh, okay... The sample is still on 1.0.0-alpha1 ... But my question is the same ^^
c
I'm not sure about the sample, but
painterResource()
is the intended replacement. It will internally determine how to load a resource based on the file extension
s
Yeah, that's what the deprecation note said. But I don't know how to replace it 😕
For now I will copy the original deprecated code. 🤷‍♂️
I think I will create an issue asking for an update to the sample
c
This post is where it was announced, and includes a snippet https://blog.jetbrains.com/kotlin/2021/08/compose-multiplatform-goes-alpha/
s
Thank you!