[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: goops - guile-clutter unexpected bug while using #:virtual slot allo
From: |
David Pirotte |
Subject: |
Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass |
Date: |
Tue, 27 Jan 2015 17:35:52 -0200 |
To be complete, raise the confusion, and allow who would want to follow and
test, the setter bug test case I pasted on irc was this one (*):
Using guile versions previous to the goops refactoring work Andy did recently,
you'd
have this answer:
scheme@(guile-user)> ,use (oop goops)
scheme@(guile-user)> ,use (b)
...
scheme@(guile-user)> (set! (!width (make <b>)) 10)
$2 = 10
scheme@(guile-user)>
The expected and correct answer after the refactoring... is
...
scheme@(guile-user)> (set! (!width (make <b>)) 10)
;;; ("this is <a> !width setter method, hello!")
scheme@(guile-user)>
Cheers,
David
(*)
;; module a.scm starts here
(define-module (a)
#:use-module (oop goops)
#:export (<a>
!width))
(define-class <a> ()
(width #:accessor !width #:init-keyword #:width #:init-value 0))
(define-method ((setter !width) (self <a>) width)
;; here comes complex code, computing earth orbit and calling lower
;; level clutter internals, such as the <clutter-actor> layout...
(pk "this is <a> !width setter method, hello!")
(slot-set! self 'width width))
;; module ends here
;; module b.scm starts here
(define-module (b)
#:use-module (oop goops)
#:use-module (a)
#:export (<b>)
#:re-export (!width))
(define-class <b> (<a>))
#;(define-method ((setter !width) (self <b>) width)
(next-method))
;; module ends here
pgpzceta04k65.pgp
Description: OpenPGP digital signature
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, Andy Wingo, 2015/01/26
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/26
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, Andy Wingo, 2015/01/27
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/27
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass,
David Pirotte <=
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, Andy Wingo, 2015/01/27
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/27
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/27
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, Andy Wingo, 2015/01/28
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/28
- Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass, David Pirotte, 2015/01/30