Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataViewListCtrl AppendItem panics #67

Open
kestrel-x86 opened this issue Feb 3, 2019 · 0 comments
Open

DataViewListCtrl AppendItem panics #67

kestrel-x86 opened this issue Feb 3, 2019 · 0 comments

Comments

@kestrel-x86
Copy link

kestrel-x86 commented Feb 3, 2019

run time panic: runtime error: cgo argument has Go pointer to Go pointer

github.com/dontpanic92/wxGo/wx.SwigClassDataViewListCtrl.AppendItem__SWIG_1.func1:103001

This panic is caused by attempting to add a row to a DataViewListCtrl

func window() wx.Dialog {
	f := wx.NewDialog(wx.NullWindow, -1, "Hello World", wx.DefaultPosition, wx.NewSizeT(300, 400))

	vboxMain := wx.NewBoxSizer(wx.VERTICAL)

	fileList := wx.NewDataViewListCtrl(f, wx.ID_ANY)
	fileList.AppendTextColumn("Column 1", wx.LIST_FORMAT_LEFT, 150)

	row := []wx.Variant{wx.NewVariant("HI")}

	fileList.AppendItem(row)

	vboxMain.Add(fileList, 0, wx.EXPAND)

	f.SetSizer(vboxMain)

	return f
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant