[cells-gtk-devel] Re: Cells-gtk

Kenny Tilton ktilton at nyc.rr.com
Thu May 26 19:19:19 UTC 2005



Fred Gilham wrote:

>Just FYI, I tried running cells-gtk under CMUCL and FreeBSD.  I got it
>to compile by fiddling with the library pathnames in gtk-ffi.lisp and
>creating links in /usr/local/lib to all the necessary C libraries.
>Then I tried running test-gtk::gtk-demo.  It got to the point of
>displaying a small icon.  Then it got an error:
>
>Error in function LISP::ASSERT-ERROR:  The assertion CELLS-GTK::CB failed.
>   [Condition of type SIMPLE-ERROR]
>
>which I assume had something to do with callbacks. 
>
The error is coming from an output method generated by the def-gtk 
macro, which in part writes code thus:

(def-c-output ,slot-name ((self ,class))
                            (when new-value
                              (callback-register self
                                ,(intern (string signal-slot) :keyword)
                                new-value)
                              (let ((cb (cdr (assoc ',signal-slot 
*widget-callbacks*))))
                                (assert cb)
                                #+shhtk (trc nil "in def-c-output 
gtk-signal-connect pcb:"
                                  cb ',slot-name (id self))
                              (gtk-signal-connect (id self)
                                ,(string-downcase (string signal-slot)) 
cb))))

It would be nice if the assertion were changed to something like:

      (assert cb () "whoa, callback ~a not defined in 
*widget-callbacks*" ',signal-slot)

The defined CBs are:

(defparameter *widget-callbacks*
  (list (cons 'clicked (ff-register-callable 'clicked-handler))
    (cons 'changed (ff-register-callable 'changed-handler))
    (cons 'activate (ff-register-callable 'activate-handler))
    (cons 'value-changed (ff-register-callable 'value-changed-handler))
    (cons 'day-selected (ff-register-callable 'day-selected-handler))
    (cons 'selection-changed (ff-register-callable 
'selection-changed-handler))
    (cons 'toggled (ff-register-callable 'toggled-handler))
    (cons 'delete-event (ff-register-callable 'delete-event-handler))
    (cons 'modified-changed (ff-register-callable 
'modified-changed-handler))))

If it seems as if the missing signal is in fact defined, I would start 
thinking about case sensitivity or packages as the usual suspects.

hth, kenneth






More information about the cells-gtk-devel mailing list