Update doc and README

This commit is contained in:
Roi Martin 2016-10-25 11:41:17 +02:00
parent fb08594c69
commit 357a541add
2 changed files with 5 additions and 3 deletions

View File

@ -14,6 +14,7 @@ Minimalist Go package aimed at creating Console User Interfaces.
* Mouse support.
* Colored text.
* Customizable edition mode.
* Easy to build reusable widgets, complex layouts...
## Installation

7
doc.go
View File

@ -69,9 +69,10 @@ Mouse events are handled like any other keybinding:
}
IMPORTANT: Views can only be created, destroyed or updated in three ways: from
layout functions, from keybinding callbacks or via *Gui.Execute(). The reason
for this is that it allows gocui to be conccurent-safe. So, if you want to
update your GUI from a goroutine, you must use *Gui.Execute(). For example:
the Layout function within managers, from keybinding callbacks or via
*Gui.Execute(). The reason for this is that it allows gocui to be
conccurent-safe. So, if you want to update your GUI from a goroutine, you must
use *Gui.Execute(). For example:
g.Execute(func(g *gocui.Gui) error {
v, err := g.View("viewname")