Toolbars sharing capi:general-image-set instance loose images on docking/undocking
Hello lispworkers, I wonder if it is a legal practice to share an instance of capi:general-image-set among interfaces. Please put the following code in a file and save it under the LispWorks examples directory. Evaluated the buffer contents. Two windows titled "Loosing images dock" are displayed. Try to undock/dock the "External images" toolbar by dragging it with the mouse within the both windows several times. For me, this results in "blind" buttons on LWW 4.4.6 and LWW 5.0 Personal. OTOH, if I call capi:make-general-image-set within the capi:define-interface form, i.e. create a "personal" image set for every interface instance, everything works as expected. ;;; File ./lib/../examples/capi/elements/loosing-images-dock.lisp (in-package "CL-USER") (gp:register-image-translation 'toolbar-radio-images #.(gp:read-external-image (current-pathname "images/toolbar-radio-images.bmp") :transparent-color-index 7)) (defvar *toolbar-radio-images* (capi:make-general-image-set :id 'toolbar-radio-images :image-count 5)) (capi:define-interface loosing-images-dock () () (:panes (toolbar1 capi:toolbar :items '(1 2 3 4 5 6)) (toolbar2 capi:toolbar :items (list (make-instance 'capi:toolbar-button :image 0) (make-instance 'capi:toolbar-button :image 1) (make-instance 'capi:toolbar-button :image 2)) :default-image-set *toolbar-radio-images*)) ;(capi:make-general-image-set ; :id 'toolbar-radio-images ; :image-count 5)) (:layouts (main capi:column-layout '(docking)) (docking capi:docking-layout '() :items '((toolbar1 :title "Internal images") (toolbar2 :title "External images"))) ) (:default-initargs :layout 'main :title "Loosing images dock")) ;; Display two instances of the interface (capi:display (make-instance 'loosing-images-dock)) (capi:display (make-instance 'loosing-images-dock)) -- Sincerely, Dmitriy Ivanov lisp.ystok.ru