first attempt at passing in the column types and names

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2019-05-08 17:44:14 -07:00
parent 67418e41da
commit 91b9a337e9
1 changed files with 15 additions and 2 deletions

17
main.go
View File

@ -72,12 +72,25 @@ func main() {
time.Sleep(1 * 1000 * 1000 * 1000) time.Sleep(1 * 1000 * 1000 * 1000)
gui.AddChoosersDemo() gui.AddChoosersDemo()
var parts []gui.InputData
for key, foo := range []string{"BG", "TEXTCOLOR", "BUTTON", "TEXTCOLOR", "TEXTCOLOR", "TEXT", "BUTTON"} {
log.Println(key, foo)
var b gui.InputData
b.CellType = foo
b.Heading = fmt.Sprintf("heading%d", key)
parts = append(parts, b)
}
log.Println("Sleep for 2 seconds, then try to add new tabs") log.Println("Sleep for 2 seconds, then try to add new tabs")
time.Sleep(1 * 1000 * 1000 * 1000) time.Sleep(1 * 1000 * 1000 * 1000)
gui.AddTableTab("jcarr", 7, "fire") gui.AddTableTab("jcarr", 7, parts)
/*
log.Println("Sleep for 1000 seconds, then try to add new tabs") log.Println("Sleep for 1000 seconds, then try to add new tabs")
time.Sleep(1000 * 1000 * 1000 * 1000) time.Sleep(1000 * 1000 * 1000 * 1000)
*/
/* /*
// THIS CRASHES FOR SOME REASON // THIS CRASHES FOR SOME REASON
@ -96,7 +109,7 @@ func main() {
proto := config.String("cloud." + account + ".proto") proto := config.String("cloud." + account + ".proto")
hostname := config.String("cloud." + account + ".hostname") hostname := config.String("cloud." + account + ".hostname")
fmt.Println(hostname, port, proto) fmt.Println(hostname, port, proto)
gui.AddTableTab(account, rows, hostname) gui.AddTableTab(account, rows, parts)
rows = 700 rows = 700
log.Println("Sleep for 10 seconds, then add next table") log.Println("Sleep for 10 seconds, then add next table")
time.Sleep(10 * 1000 * 1000 * 1000) time.Sleep(10 * 1000 * 1000 * 1000)