Closed tataDan closed 1 year ago
What version is giu do you use in this external directory? In examples dir widgets.go is in module scope of giu clone, but somewhere else it probably usesa cached version from go cache. Try go get -u github.com/AllenDang/giu@master
Initially this line was in my go.mod file: require github.com/AllenDang/giu v0.6.2
.
After running go get -u github.com/AllenDang/giu@master
that line is now require github.com/AllenDang/giu v0.6.3-0.20230825093324-3e09263b6d47
.
Running that command removed the error and I can successfully run the application.
However, I still do not understand when I should use v0.6.2 and when I should use master.
I successfully ran several other of the examples programs using v0.6.2.
It's just becauseShortcut
method is present in master and isn't on 0.6.2 tag
What happend?
If I create a new directory and copy examples/widgets.go to it, I get the "MenuItemWidget has no field or method Shortcut" error for line 49. Line 49 is
g.MenuItem("Open").Shortcut("Ctrl+O"),
.However, if I run widgets.go directly from the clone of the repository, there is no error.
Code example
To Reproduce
go mod init widgets
go run widgets.go
Version
(latest)
OS
Debian 12