try to avoid the problems
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
7789348247
commit
ea17d6dbe2
|
@ -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
23
main.go
|
@ -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")
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue