From 32990af0fddd4f4ea8f3c53921005d86c87f1279 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Wed, 22 May 2019 17:53:50 -0700 Subject: [PATCH] try to delete and replace the ui.Tab(0) Signed-off-by: Jeff Carr --- README.md | 10 ++++++++++ example-systray/Makefile | 4 ++++ test2/main.go | 7 ++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f02bb3..5d45a90 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,16 @@ Obviously I'm developing this app on Linux so if things are broken in the MacOS or Windows, check the Linux version if possible to see if it is also broken there. +# IMPORTANT NOTES + +To use the cross platform UI, all GUI interactions must be +done from within the same goroutine for it to work properly +on Windows. This is an annoying limitation of how Windows works +(or so it appears. maybe someone will figure out how to fix that) + +This means the Windows version of this GUI will probably always +be sub-par verses the Linux and Macintosh versions + # build ``` diff --git a/example-systray/Makefile b/example-systray/Makefile index e07773d..bd018e3 100644 --- a/example-systray/Makefile +++ b/example-systray/Makefile @@ -1,2 +1,6 @@ +build: + go build + ./example-systray + run: go run *.go diff --git a/test2/main.go b/test2/main.go index 766e3de..27e4ada 100644 --- a/test2/main.go +++ b/test2/main.go @@ -40,8 +40,13 @@ func main() { func buttonClick(i int, s string) { log.Println("test2 buttonClick() i, s =", i, s) + cloudTab.Delete(0) + + log.Println("Sleep(2000)") + time.Sleep(2000 * time.Millisecond) + smallBox = account1.AddAccountBox(nil, splashClose) - cloudTab.InsertAt("Intro", 1, smallBox) + cloudTab.InsertAt("Intro", 0, smallBox) cloudTab.SetMargined(0, true) }