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. * Mouse support.
* Colored text. * Colored text.
* Customizable edition mode. * Customizable edition mode.
* Easy to build reusable widgets, complex layouts...
## Installation ## 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 IMPORTANT: Views can only be created, destroyed or updated in three ways: from
layout functions, from keybinding callbacks or via *Gui.Execute(). The reason the Layout function within managers, from keybinding callbacks or via
for this is that it allows gocui to be conccurent-safe. So, if you want to *Gui.Execute(). The reason for this is that it allows gocui to be
update your GUI from a goroutine, you must use *Gui.Execute(). For example: 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 { g.Execute(func(g *gocui.Gui) error {
v, err := g.View("viewname") v, err := g.View("viewname")