bug-g-golf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Functions operating on <gtk-expression>'s don't work.


From: Noah Evans
Subject: Functions operating on <gtk-expression>'s don't work.
Date: Sun, 25 Jul 2021 22:07:11 +0000

Attempting to use a function that takes a <gtk-_expression_> or one of its subtypes throws this error:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
No applicable method for #<<accessor> !g-inst (5)> in call (!g-inst #<<gtk-constant-_expression_> 7f8e1c7b3390>)

I don't really have the skills to fully diagnose the problem, but I think it's because <gtk-_expression_> is a base type and doesn't inherit from <gobject>.

Here is a simple program to reproduce:

(use-modules (oop goops))
(default-duplicate-binding-handler
    '(merge-generics replace warn-override-core warn last))
(use-modules (g-golf))

(g-irepository-require "Gtk" #:version "4.0")
(for-each (lambda (name)
            (gi-import-by-name "Gtk" name))
'("_expression_" "ConstantExpression"))

(define value (g-value-init 'int))
(g-value-set-int value 3)

(define expn (gtk-constant-_expression_-new-for-value value))
(gtk-constant-_expression_-get-value expn)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]