diff options
| author | Jeff Carr <[email protected]> | 2023-12-03 16:08:39 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2023-12-03 16:59:57 -0600 |
| commit | 9d075afb1df62276dea06be4a188eaee8fc69420 (patch) | |
| tree | 915472449c509dc7fd77f18fa43edecc46e56f46 /cmds/debug/main.go | |
| parent | 7880d9df6de1040258bea966f040e12be6205af1 (diff) | |
clean and rename examples
fix syntax
try new goreadme
remove autogenerated go readme.md
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'cmds/debug/main.go')
| -rw-r--r-- | cmds/debug/main.go | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/cmds/debug/main.go b/cmds/debug/main.go deleted file mode 100644 index 375ccae..0000000 --- a/cmds/debug/main.go +++ /dev/null @@ -1,54 +0,0 @@ -package main - -import ( - "log" - "os" - "time" - - "git.wit.org/wit/gui" -) - -// This initializes the first window -// -// BUG: THIS PROGRAM DOESN'T EXIT PROPERLY (NOT REALLY A BUG) -// -// Then starts a goroutine to demonstrate how to -// inject things into the GUI -func main() { - log.Println("Starting my Control Panel") - -// gui.Init() -// go gui.Main(helloworld) - go gui.Main(gui.DebugWindow) -// go gui.DemoToolkitWindow() - - watchGUI() -} - -// This demonstrates how to properly interact with the GUI -// You can not involke the GUI from external goroutines in most cases. -func watchGUI() { - var i = 1 - for { - log.Println("Waiting", i, "seconds") - i += 1 - time.Sleep(1 * time.Second) - if i == 2 { - log.Println("Opening a Debug Window via the gui.Queue()") - gui.Config.Width = 800 - gui.Config.Height = 300 - gui.Config.Exit = myExit - // gui.DebugWindow() - time.Sleep(1 * time.Second) - // gui.DebugTab() - } - } -} - -// TODO: myExit isn't getting used anymore -func myExit(n *gui.Node) { - log.Println() - log.Println("Entered myExit() on node.Name =", n.Name) - log.Println() - os.Exit(0) -} |
