jroimartin / gocui

Minimalist Go package aimed at creating Console User Interfaces.
BSD 3-Clause "New" or "Revised" License
9.92k stars 608 forks source link

Improve documentation about concurrency and *Gui.Execute() #78

Closed jroimartin closed 7 years ago

jroimartin commented 8 years ago

Explain how concurrency works in gocui under the hood. For instance, write a bit about channels for keyboard/mouse and user events and put more emphasis on how to modify views from goroutines.

Relates to #77

gbitten commented 7 years ago

When I used gocui recently, I made the mistake of calling SetKeybinding from a Layout method. That made my system works weird, binding the same key multiple times. Saying that, maybe the best way for the documentation is to define the best practices or patterns to use gocui's methods in general.

awnumar commented 7 years ago

I agree with @gbitten, but what should be considered is that good practices can be found in the examples directory. However, they only teach people how they should use something, not how it works or why that way. The documentation is quite obscure in that respect.

jroimartin commented 7 years ago

Function renamed to *Gui.Update() + more docs in 6564cfcacb01db61e3a4e983405a598db3e91982.