Hi Andy, > Ah, funny, I thought the version would always correspond to what you > had. But that is not the case: > > wingo@badger:~/src/guile$ git describe > v2.0.2-7-gae88d9b > wingo@badger:~/src/guile$ meta/guile > GNU Guile 2.0.2.4-c1e3e > > I guess what I meant was that you needed a newer Guile, but you might > have a new enough one. Hmm.
I think I did put a finger on some deeper problem! At first, as it is still is not working here in a more 'complex environment', I did build a slightly modified version using gtk but not yet 'realizing' the widgets [attached]. It seemed it worked on one machine but not on the other. Suspecting a 'strange' collateral effect on whether I did or not put (default-duplicate-binding-handler '(merge-generics replace warn-override-core warn last)) in my init.scm file, using or not the #:duplicates ... in mg-wgtk-3.scm and, couple of hours later, almost ready to knock my head on the wall while just trying to simply produce a reproducable 'something' for you. :), than I spotted it! it only works the first time! then guile compiles and caches the .go files but does something 'different' in memory [I guess] the second time, it load the .go and fails to dispatch Here is a track on the 'latest' version [by number at least]: In a terminal: [I first remove the *.go concerned files [the location will depend off course ...] david@rascar:~/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests 6 $ rm -f *.go david@rascar:~/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests 7 $ ll total 0 In my emacs: david@rascar:~ 13 $ guile-gnome-2 GNU Guile 2.0.2.7-ae88d ... scheme@(guile-user)> (use-modules (mg-wgtk-3)) (letstry) ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0 ;;; or pass the --no-auto-compile argument to disable. ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-3.scm ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-1.scm ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-1.scm.go ;;; compiling /usr/local/share/guile/alto/2.0/tests/mg-wgtk-2.scm ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-2.scm.go WARNING: (mg-wgtk-3): `dialog' imported from both (mg-wgtk-1) and (mg-wgtk-2) ;;; compiled /usr/alto/staff/david/.cache/guile/ccache/2.0-LE-4-2.0/usr/local/share/guile/alto/2.0/tests/mg-wgtk-3.scm.go Top level dialog: #<<gtk-window> 9ab4d10> Printing dialog: #<<gtk-message-dialog> 9ab4600> $1 = #t scheme@(guile-user)> ,q david@rascar:~ 14 $ guile-gnome-2 GNU Guile 2.0.2.7-ae88d ... scheme@(guile-user)> (use-modules (mg-wgtk-3)) (letstry) WARNING: (mg-wgtk-3): `dialog' imported from both (mg-wgtk-1) and (mg-wgtk-2) ERROR: In procedure scm-error: ERROR: No applicable method for #<<accessor> dialog (1)> in call (dialog #<<tl-widget> a1ccba0>) Entering a new prompt. Type `,bt' for a backtrace or `,q' to continue.
(define-module (mg-wgtk-1) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :export (<tl-widget> dialog make-tl-widget )) (define-class <tl-widget> () (dialog :accessor dialog :init-keyword :dialog :init-value #f) ) (define (make-tl-widget) (let ((tl-widget (make <tl-widget> :dialog (make <gtk-window> :type 'toplevel )))) tl-widget))
(define-module (mg-wgtk-2) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :export (<p-widget> dialog make-p-widget )) (define-class <p-widget> () (dialog :accessor dialog :init-keyword :dialog :init-value #f) ) (define (make-p-widget) (let ((p-widget (make <p-widget> :dialog (make <gtk-message-dialog> )))) p-widget))
(define-module (mg-wgtk-3) :use-module (ice-9 format) :use-module (oop goops) :use-module (gnome gobject) :use-module (gnome gtk) :use-module (mg-wgtk-1) :use-module (mg-wgtk-2) :duplicates (merge-generics replace warn-override-core warn last) :export (letstry )) (define (letstry) (let ((tl (make-tl-widget)) (p (make-p-widget))) (format #t "Top level dialog: ~S~%" (dialog tl)) (format #t "Printing dialog: ~S~%" (dialog p)))) #! (use-modules (macros push)) (push! "/usr/local/share/guile/alto/2.0/tests" %load-path) (use-modules (mg-wgtk-3)) (letstry) !#