guile-devel
[Top][All Lists]
Advanced

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

Re: goops - guile-clutter unexpected bug while using #:virtual slot allo


From: Panicz Maciej Godek
Subject: Re: goops - guile-clutter unexpected bug while using #:virtual slot allocation for a <clutter-actor> subclass
Date: Sat, 20 Dec 2014 00:42:38 +0100

Hi,

My first impression is that the error might be caused by using the combination of #:allocation #:virtual and #:init-keyword for the "colour" slot. Since #:init-keyword initializes slot value with a given value, and virtual slots have no actual value, the semantics of such operation is rather unclear.

If your intention is to use the keyword as an argument to the constructor, you should rather provide a custom "initialize" method (and drop the "init-keyword" for the colour slot):

(define-method (initialize (self <bar>) args)
  (next-method)
  (let-keywords args #t ((colour (or #f some-default-value-you-wish)))
    (if colour (slot-set! self 'colour colour))))

HTH

2014-12-19 20:46 GMT+01:00 David Pirotte <address@hidden>:
Hello,

It would be really nice if someone can help me with the following unexpected bug:

        http://paste.lisp.org/+33RA

I don't think i'll be able to solve it by myself, at this level of knowledge I have
from both goops [implementation I mean, knowledge close to zero] and the low level
machinery gnome/gobject/gtype.scm

Many thanks,
David

reply via email to

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