Closed joeblew99 closed 7 years ago
I believe those deprecated messages are just warnings. Please try using go build instead of go run main.go and it should build. I will look into updating the driver.
thanks.
go build failed on src/github.com/jnjackins/graphics/cmd/edit with same error message and no binary output
So i figured that maybe its getting vendored and non vendored stuff mixed up, and so I deleted my src/golang.org/x/exp, to make sue it used your vendored ones and it still failed.
Hmmm stumped.... Might be best i try again when you have updated the dependencies. Really keen to try this out :)
About the cocoa errors. I fixed them and send them to Nigel about 6 months ago ( I did not want to use Gerrit, etc and so just pasted the fix into the issues list), and he put them into the tree so they should be fixed. SO you should get the fixes when you update your vendored files. https://github.com/golang/go/issues/17413
Unfortunately there are some changes in the vendored shiny packages here that I need to try to submit upstream to golang.org/x/exp/shiny. This was necessary to get smooth scrolling working properly on OS X. This also involved changing the mouse event API if I remember correctly, so the changes may not be accepted. For now I will patch in your changes, which will hopefully get your build working.
ok then. I will give it another shot when your ready. I plan to do some MDL experimenting.
You should contact Nigel with the OSX scrolling changes. I reckon he will happily accept your changes.
@joeblew99 please try again now.
ok, much better.
pwd
/Users/apple/workspace/go/src/github.com/jnjackins/graphics/cmd/edit
x-MacBook-Pro:edit apple$ go build main.go
# command-line-arguments
./main.go:27: undefined: widget
./main.go:29: undefined: widget
./main.go:63: undefined: loadFont
./main.go:78: undefined: updateFont
./main.go:79: undefined: fontFace in fontFace.Metrics
./main.go:84: undefined: newWidget
./main.go:84: undefined: fontFace
./main.go:88: undefined: loadMain
./main.go:92: undefined: newWidget
./main.go:92: undefined: fontFace
./main.go:92: too many errors
How to run it so its does not complain ? Need some ENV variables ??
You need to run go build
with no arguments, or go run *.go
. This is true in general for Go programs: go build/run main.go
will only work if main.go is self-contained.
thanks.
got one last bug..
go build
# github.com/jnjackins/graphics/cmd/edit
./main.go:148: cannot use e (type "github.com/jnjackins/graphics/vendor/golang.org/x/mobile/event/mouse".Event) as type "sigint.ca/graphics/vendor/golang.org/x/mobile/event/mouse".Event in argument to selected.ed.SendMouseEvent
Please try deleting everything under $GOPATH/src/github.com/jnjackins, and run go get -u -t sigint.ca/graphics/cmd/edit
.
ok nuked and rerun from the canonical path
All works and runs now :) Fast too.
trying out your editor
i cant get a build because of the vendored shiny drivers being too old. https://github.com/golang/exp/blob/master/shiny/driver/gldriver/gldriver.go