andlabs / andlabs/ui

MacOS 10.12.6 - Grid + Tab not working

オープン
#362 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
8.4k
フォーク
639
PR マージ指標
30日以内にマージされた PR はありません

説明

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](https://pastebin.com/F9LAPX8D)

how can resolve?

thanks.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。