ui icon indicating copy to clipboard operation
ui copied to clipboard

MacOS 10.12.6 - Grid + Tab not working

Open antwal opened this issue 6 years ago • 2 comments

generate runtime error

my partial code:

	app.mainWindow = ui.NewWindow(getAppTitle(), 320, 200, false)
	app.mainWindow.SetMargined(false)
	app.mainWindow.OnClosing(func(*ui.Window) bool {
		app.hideMainWindow()
		return false
	})

	grid := ui.NewGrid()
	grid.SetPadded(true)

	app.mainWindow.SetChild(grid)
	app.mainWindow.SetMargined(true)

	tab := ui.NewTab()
	grid.Append(tab, 0, 0, 1, 1, true, ui.AlignFill, true, ui.AlignFill)

	tab.Append("Status", app.makeStatusPage())
	tab.SetMargined(0, true)

debug error:

dlv debug ./
# _/Users/antwal/Projects/cncrev
ld: warning: object file (/var/folders/t8/b6xtsj5121q_9qcnbwcpcxwc0000gn/T/go-link-307188063/000049.o) was built for newer OSX version (10.10) than being linked (10.8)
ld: warning: object file (/var/folders/t8/b6xtsj5121q_9qcnbwcpcxwc0000gn/T/go-link-307188063/000050.o) was built for newer OSX version (10.10) than being linked (10.8)
Type 'help' for list of commands.
(dlv) break makeMainWindow
Breakpoint 1 set at 0x43364cb for main.(*AppGUI).makeMainWindow() ./gui.go:215
(dlv) c
2019/07/30 16:18:17 err=Near line 1 (last key parsed 'Ports'): strings cannot contain newlines
> main.(*AppGUI).makeMainWindow() ./gui.go:215 (hits goroutine(1):1 total:1) (PC: 0x43364cb)
   210:	
   211:	func (app *AppGUI) onSystrayExit() {
   212:		app.CloseMainWindow(false)
   213:	}
   214:	
=> 215:	func (app *AppGUI) makeMainWindow() {
   216:		app.mainWindow = ui.NewWindow(getAppTitle(), 320, 200, false)
   217:		app.mainWindow.SetMargined(false)
   218:		app.mainWindow.OnClosing(func(*ui.Window) bool {
   219:			app.hideMainWindow()
   220:			return false
(dlv)
....
(dlv) n
> main.(*AppGUI).makeMainWindow() ./gui.go:230 (PC: 0x4336657)
   225:	
   226:		app.mainWindow.SetChild(grid)
   227:		app.mainWindow.SetMargined(true)
   228:	
   229:		tab := ui.NewTab()
=> 230:		grid.Append(tab, 0, 0, 1, 1, true, ui.AlignFill, true, ui.AlignFill)
   231:	
   232:		tab.Append("Status", app.makeStatusPage())
   233:		tab.SetMargined(0, true)
   234:		tab.Append("Sensors", app.makeSensorsPage())
   235:		tab.SetMargined(1, true)
(dlv) n
Stopped at: 0x7fffd271470a
=>no source available
Command failed: bad access

debug detail: link here

how can resolve?

thanks.

antwal avatar Jul 30 '19 14:07 antwal

Yes, tabs and grids on macOS are very buggy right now. I'm working on making them more stable.

andlabs avatar Jul 30 '19 15:07 andlabs

@andlabs ok, I can do some tests on Mac OS Sierra/Mojave; on windows and linux they work very well

antwal avatar Aug 01 '19 18:08 antwal