try to avoid the problems

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-01-08 05:20:15 -06:00
parent 7789348247
commit ea17d6dbe2
2 changed files with 37 additions and 23 deletions

37
fakeout.go Normal file
View File

@ -0,0 +1,37 @@
/*
this is not a real package anymore
at one time, gui was
"go.wit.com/gui" but I wanted to move it to
"go.wit.com/gui/gui to make other things.
that turned into a mess because there was old packages here
and I couldn't figure out how to avoid that so I did this
hopefully this doesn't cause more problems. --jcarr 2024/01/18
*/
package "gui"
import (
"log"
"go.wit.com/gui/gui"
"go.wit.com/gui/gadgets"
)
func test() {
helloworld()
// This is just a optional goroutine to watch that things are alive
gui.Watchdog()
}
// This creates a window
func helloworld() {
myGui := gui.New().Default()
myWindow := myGui.NewWindow("helloworld golang wit/gui window")
gadgets.NewBasicWindow(myGui, "helloworld golang wit/gui window")
myWindow.NewButton("hello", func () {
log.Println("world")
})
}

23
main.go
View File

@ -1,23 +0,0 @@
// This is a simple example
package "gui"
import (
"log"
"go.wit.com/gui/gui"
)
func test() {
helloworld()
// This is just a optional goroutine to watch that things are alive
gui.Watchdog()
}
// This creates a window
func helloworld() {
myGui := gui.New().Default()
myWindow := myGui.NewWindow("helloworld golang wit/gui window")
myWindow.NewButton("hello", func () {
log.Println("world")
})
}