CAPI and bad tab-layout bahavior.
Hi I already asked something along these lines some time ago. However, now I was able to narrow down the bad behavior to the following case. =========================================================== ;;; -*- Mode: Lisp -*- ;;; bad-interface.lisp (capi:define-interface bad-tab-layout () () (:panes (one capi:output-pane ) (two capi:pinboard-layout :reader btl-two ) ) (:layouts (main capi:tab-layout () :items '(("ONE" one) ("TWO" two)) :print-function 'first :visible-child-function 'second )) (:default-initargs :layout 'main)) (defun add-pinboard-layout (pinboard-layout) (setf (capi:layout-description pinboard-layout) (list (make-instance 'capi:pinboard-layout)))) (defun add-pinboard-object (pinboard-layout) (setf (capi:layout-description pinboard-layout) (list (make-instance 'capi:drawn-pinboard-object)))) (defun add-pinboard-layout* (pinboard-layout cause-error-p) (when cause-error-p (print (multiple-value-list (capi:get-constraints pinboard-layout)))) (setf (capi:layout-description pinboard-layout) (list (make-instance 'capi:pinboard-layout)))) (defun add-pinboard-object* (pinboard-layout cause-error-p) (when cause-error-p (print (multiple-value-list (capi:get-constraints pinboard-layout)))) (setf (capi:layout-description pinboard-layout) (list (make-instance 'capi:drawn-pinboard-object)))) (defun test-no-error () (let ((btl (capi:display (make-instance 'bad-tab-layout)))) (add-pinboard-layout (btl-two btl)) (add-pinboard-object (first (capi:layout-description (btl-two btl)))) btl)) (defun test-error (&optional (error1 t) (error2 t)) (let ((btl (capi:display (make-instance 'bad-tab-layout)))) (add-pinboard-layout* (btl-two btl) error1) (add-pinboard-object* (first (capi:layout-description (btl-two btl))) error2) btl)) =========================================================== The errors appear in LWW and LWM (although up to 4.3, I have not tested 4.4) Calling TEST-NO-ERROR causes no error at all. Calling TEST-ERROR with the two switches properly set causes different kinds of errors. No error appears if the effect of TEST-ERROR are caused *after* the pinboard layout "TWO" is selected in the tab layout. =========================================================== CL-USER 88> (test-error) (1 1 NIL NIL) Error: (Internal) No parent representation for #<CAPI:PINBOARD-LAYOUT 100E0C07> 1 (abort) Return to level 0. 2 Return to top loop level 0. Type :b for backtrace, :c <option number> to proceed, or :? for other options CL-USER 89 : 1 > (test-error nil t) (1 1 NIL NIL) Error: No applicable methods for #<STANDARD-GENERIC-FUNCTION CAPI::FORCE-CHANGE-SIZE 1080821A> with args (NIL #<CAPI:PINBOARD-LAYOUT 100EA76B>) 1 (continue) Call #<STANDARD-GENERIC-FUNCTION CAPI::FORCE-CHANGE-SIZE 1080821A> again 2 (abort) Return to level 0. 3 Return to top loop level 0. Type :b for backtrace, :c <option number> to proceed, or :? for other options CL-USER 90 : 1 > ============================================================ This is almost a show stopper for me now. Is there a way around without having to resort to a tab-layout in callback mode? Thanks Marco -- Marco Antoniotti http://bioinformatics.nyu.edu NYU Courant Bioinformatics Group tel. +1 - 212 - 998 3488 715 Broadway 10th FL fax. +1 - 212 - 998 3484 New York, NY, 10003, U.S.A.