https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
d

Daniele B

01/20/2023, 11:51 PM
I am updating some old code and it gets some errors. How should window’s title and size be specified now? I am using Compose Multiplatform 1.2.2
a

Adam Brown

01/21/2023, 12:38 AM
I'm not at a computer right now, but I believe there is a config object, or state object, that stores that data now
p

PHondogo

01/21/2023, 6:45 AM
parameter 'size' now is part of 'state' parameter
d

Daniele B

01/21/2023, 12:15 PM
I still get an error
the definition of Window in 1.2.2 doesn’t seem to have neither title nor state:
p

PHondogo

01/21/2023, 2:31 PM
May be it is set in FrameWindowScope that is passed as receiver to content lambda parameter?
d

Daniele B

01/21/2023, 3:02 PM
maybe it depends on these gradle settings?
Screenshot 2023-01-21 alle 16.01.32.png
I removed that optIn, and resynced and rebuilt the project, but Window seems to still point to that function. Mmm, what am I doing wrong?
Looking at the Compose Multiplatform wiki example https://github.com/JetBrains/compose-jb/tree/master/tutorials/Getting_Started#create-a-new-compose-project-without-the-wizard I added the parameter
onCloseRequest = ::exitApplication,
and not it works. It looks like such parameter is mandatory.
8 Views