dtylman / gowd

Build cross platform GUI apps with GO and HTML/JS/CSS (powered by nwjs)
MIT License
432 stars 43 forks source link

Cannot set text of a text area. #11

Closed airyy closed 6 years ago

airyy commented 6 years ago

Hello,

First off, I would like to say that I am glad I found this library because I really like it.

Now, my issue is that whenever I try and set the text of a textarea element using element.SetText(), it will clear all my elements(the body). I am not sure why this happens but thought that maybe you could look into it.

Thanks!

dtylman commented 6 years ago

Hi & thanks!

I was not able to reproduce this. Can you share a code sample?

This code seems to be working:

b := new(body)
    b.Element = bootstrap.NewContainer(true)

    b.area = b.AddElement(gowd.NewElement("TextArea"))
    b.area.SetText("lala")

Given:


type body struct {
    *gowd.Element
    area        *gowd.Element
}