Skip to content

DataViewListCtrl AppendItem panics #67

@kestrel-x86

Description

@kestrel-x86

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
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions