https://kotlinlang.org logo
#doodle
Title
# doodle
n

Nick

02/23/2023, 4:56 PM
hmm. this should work (and does when i try it locally). are you sure the js file you have in index.html is the right one? also, can you add
println
statements to verify that your code is being executed? last thing to consider is whether
display.size
is empty by chance. that would mean your view has no size. as defined, your view's size will be a fixed value and won't change as you resize the window. you can fix that by doing:
Copy code
class HelloDoodle(display: Display): Application {
    init {
        val view = view {
            render = {
                text("Hello, Doodle!", color = Black)
            }
        }

        display += view
        display.fill(White.paint)
        display.layout = constrain(view, fill) // adds a constraint based layout that causes view to fit the display
    }

    override fun shutdown() {}
}
n

Nazar Pohonchuk

02/23/2023, 6:16 PM
Yeah, you are right, it was the wrong js file. I misspelt its name. Thank you very much. As you understand I am a newbie, so sorry for the stupid questions
7 Views