Skip to content

initialization of a variable meant to be GtkTreeModel #127

@andy-tai

Description

@andy-tai

mail list thread: https://lists.gnu.org/archive/html/guile-user/2022-06/msg00024.html

how to initialize a variable meant to be a GtkTreeModel, a Gtk "interface"?

(selection is a valid GtkTreeSelection obtained elsewhere earlier)
This does not work (the second line would result in error):

(let ((iter (make <GtkTreeIter>))
 (model (make <GtkTreeModel>)))
 (define selected (tree-selection:get-selected! selection model iter))

This does not work either, error out on the second line:

(let ((iter (make <GtkTreeIter>))
  (model (make <GtkListStore>)))
  (define selected (tree-selection:get-selected! selection model iter))

as GtkListStore implements GtkTreeModel but GOOPS says GtkListStore is not the expected type for the second argument

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