Closed abenz1267 closed 2 months ago
Ok, i figured it out:
listModelType := gioutil.NewListModelType[modules.Entry]()
items := listModelType.New()
You can then retrieve the underyling value via
valObj := ui.items.Item(item.Position())
val := ui.listModelType.ObjectValue(valObj)
In case someone else runs into this.
entry := gioutil.ObjectValue[T](val)
works as well
Hi,
with the new release
*gioutil.ListModel[modules.Entry]
doesn't returnmodules.Entry
anymore, but instead theglib.Object
. I tried casting like thisentry := ui.items.Item(ui.selection.Selected()).Cast().(interface{}).(*modules.Entry)
... without success.I bet i'm missing a simple solution here...
Regards