Skip to content
Snippets Groups Projects
Commit 042cbe5e authored by Torda, Prof. Dr. Andrew Ernest's avatar Torda, Prof. Dr. Andrew Ernest
Browse files

Fixed problem with updating the fyne ui library. Calls made by a background...

Fixed problem with updating the fyne ui library. Calls made by a background thread now have to be put in a cumbersome wrapper inside fine.Do(). Now can update the library from 2.5.x to 2.6.
parent f9e24371
No related branches found
No related tags found
No related merge requests found
......@@ -46,8 +46,7 @@ Check if this is real. When doing simulated annealing, we print out the best val
### Version problems
- # devel branch broken
Two problems
- If I update to fyne 2.6, I get mysterious errors from fyne. V 2.5.5 works.
- I have a problem with the axes not being drawn. This is the plotting library. 2.1.1 works, but 2.1.2 loses the axes.
- I have a problem with the axes not being drawn. This is the plotting library. 2.1.1 works, but 2.1.2 loses the axes. My tick creating functions are being called, but the chart library does not seem to be reserving space for the axes.
......
......@@ -3,7 +3,7 @@ module example.com/ackley_mc
go 1.21.5
require (
fyne.io/fyne/v2 v2.5.5
fyne.io/fyne/v2 v2.6.0
github.com/wcharczuk/go-chart/v2 v2.1.1
gitlab.rrz.uni-hamburg.de/Bae5157/axticks v0.0.0-20220120103412-d663ebb46145
)
......@@ -15,30 +15,32 @@ require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fredbi/uri v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect
github.com/fyne-io/glfw-js v0.0.0-20241126112943-313d8a0fe1d0 // indirect
github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect
github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect
github.com/fyne-io/gl-js v0.1.0 // indirect
github.com/fyne-io/glfw-js v0.2.0 // indirect
github.com/fyne-io/image v0.1.1 // indirect
github.com/fyne-io/oksvg v0.1.0 // indirect
github.com/go-gl/gl v0.0.0-20231021071112-07e5d0ea2e71 // indirect
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20240506104042-037f3cc74f2a // indirect
github.com/go-text/render v0.2.0 // indirect
github.com/go-text/typesetting v0.2.0 // indirect
github.com/go-text/typesetting v0.2.1 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/gopherjs/gopherjs v1.17.2 // indirect
github.com/jeandeaual/go-locale v0.0.0-20240223122105-ce5225dcaa49 // indirect
github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect
github.com/hack-pad/go-indexeddb v0.3.2 // indirect
github.com/hack-pad/safejs v0.1.0 // indirect
github.com/jeandeaual/go-locale v0.0.0-20241217141322-fcc2cadd6f08 // indirect
github.com/jsummers/gobmp v0.0.0-20230614200233-a9de23ed2e25 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/nicksnyder/go-i18n/v2 v2.4.0 // indirect
github.com/nicksnyder/go-i18n/v2 v2.5.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rymdport/portal v0.3.0 // indirect
github.com/rymdport/portal v0.4.1 // indirect
github.com/srwiley/oksvg v0.0.0-20221011165216-be6e8873101c // indirect
github.com/srwiley/rasterx v0.0.0-20220730225603-2ab79fcdd4ef // indirect
github.com/stretchr/testify v1.8.4 // indirect
github.com/yuin/goldmark v1.7.1 // indirect
golang.org/x/image v0.18.0 // indirect
golang.org/x/mobile v0.0.0-20231127183840-76ac6878050a // indirect
golang.org/x/net v0.25.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.16.0 // indirect
github.com/stretchr/testify v1.10.0 // indirect
github.com/yuin/goldmark v1.7.8 // indirect
golang.org/x/image v0.24.0 // indirect
golang.org/x/net v0.35.0 // indirect
golang.org/x/sys v0.30.0 // indirect
golang.org/x/text v0.22.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
This diff is collapsed.
......@@ -145,7 +145,8 @@ func showResultsTab(cntr *fyne.Container, win fyne.Window, rslt mcwork.MCresult)
split := container.NewHSplit(left, right)
split.SetOffset(0.01)
cntr.Add(split)
win.Resize(cntr.Size()) // only necessary on first call
wrapRsz := func () {win.Resize(cntr.Size())}
fyne.Do (wrapRsz) // only necessary on first call
}
// outputTab is run as a background process. After showing the initial
......@@ -159,8 +160,8 @@ func outputTab(genParams genParams, cntr *fyne.Container, form *widget.Form) {
showCalcTab(cntr)
case resultsReady:
showResultsTab(cntr, genParams.win, s.MCresult)
form.Enable()
form.Refresh()
enablRfrsh := func () { form.Enable(); form.Refresh()}
fyne.Do (enablRfrsh)
case errorCalc:
showErrTab(cntr, s.err)
form.Enable()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment