-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Trying to compare two widgets for equal identity:
(define-method (split (container <GtkPaned>)
(orientation <symbol>))
(let* ((focused (get-focus-child container))
(setter (if (equal? focused (get-start-child container))
set-start-child
set-end-child)))
...
However, the if-clause will always return #f
, because get-focus-child
seemingly always gives fresh references which hence are never eq?
or equal?
(display (get-focus-child container)) ; -> #<<GtkTextView> 7fc25c6e0e20>
(display (get-focus-child container)) ; -> #<<GtkTextView> 7fc25c6e0b70>
(display (get-focus-child container)) ; -> #<<GtkTextView> 7fc25c6e09b0>
(display (eq? (get-focus-child container) (get-focus-child container)) ; -> #f
Is this a bug, or expected behaviour?
Metadata
Metadata
Assignees
Labels
No labels