We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It always be empty when I print the content of the TextEditor, test code is below:
package main import ( "fmt" "github.com/roblillack/spot" "github.com/roblillack/spot/ui" ) func main() { ui.Init() spot.MountFn(func(ctx *spot.RenderContext) spot.Component { content, setContent := spot.UseState(ctx, "") return &ui.Window{ Title: "Test", Width: 800, Height: 600, Children: []spot.Component{ &ui.Button{ X: 10, Y: 10, Width: 780, Height: 20, Title: "OK", OnClick: func() { fmt.Println("content of the textEditor is:", content) // content is always empty here }, }, &ui.TextEditor{ X: 10, Y: 30, Width: 780, Height: 560, Text: content, OnChange: setContent, }, }, } }) ui.Run() }
The text was updated successfully, but these errors were encountered:
Hi @zrcoder, you seem to be using Cocoa. This was a bug, which was just fixed with a contribution by @Suremeo in #20. What coincidence!
If you try again with the main branch, things should be working now. Can you confirm?
main
Sorry, something went wrong.
Hi @zrcoder, you seem to be using Cocoa. This was a bug, which was just fixed with a contribution by @Suremeo in #20. What coincidence! If you try again with the main branch, things should be working now. Can you confirm?
Yes, I used spot on my mac, and the code works with the main branch. Thanks a lot, spot is very good, easy enouph to use.
No branches or pull requests
It always be empty when I print the content of the TextEditor, test code is below:
The text was updated successfully, but these errors were encountered: