RE: Tab-control problems: Panes on 2., 3. etc tabs not created initially - how am I notified?
> From: Martin Simmons [mailto:martin@lispworks.com] > > Could you explain what you mean by "fill" please? The panes > are available via the slots in the interface and it should be > posible to set the text before they are created, unless you > need to do something that depends on the size of the pane. I just try to set the text, that's what I mean by 'fill'. I try to set the text in the pane, using this function: (defun report-message-to-window (type message) "Reports a message to the window. Message may be a list of strings, or a string." (capi:apply-in-pane-process (get-window-messages) #'(lambda (pane text type) (let ((old-text (capi:text-input-pane-text pane))) (setf (capi:text-input-pane-text pane) (if (listp text) (progn (concatenate 'string (format nil "~:{~A~A~^~%~}~%" text) old-text)) (progn (concatenate 'string type ": " text (format nil "~%") old-text)))))) (get-window-messages) message type)) with (defparameter *main-window* (make-instance 'scenario-status-window :visible-min-height '(character 30) :visible-min-width '(character 120))) (defun get-window-messages () (slot-value *main-window* 'runtime-messages)) (defun display-main-window () (capi:display *main-window* :process t)) and the tab-window from my first post. Then CL-USER> (display-main-window) #<SCENARIO-STATUS-WINDOW "Scenario status" 206AA2A4> CL-USER> (report-message-to-window "serious" "no window today") gives a backtrace No applicable methods for #<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:INTERFACE-PROCESS 20F3C20A> with args (#<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54>) [Condition of type SIMPLE-ERROR] Restarts: 0: [CONTINUE] Call #<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:INTERFACE-PROCESS 20F3C20A> again 1: [ABORT] Abort handling SLIME request. 2: [ABORT] Quit process. Backtrace: 0: CONDITIONS::CONDITIONS-ERROR (:INVISIBLEP T "No applicable methods for ~S with args ~S" (#<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:INTERFACE-PROCESS 20F3C20A> (#<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54>))) 1: CERROR ("Call ~S again" "No applicable methods for ~S with args ~S" &REST (#<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:INTERFACE-PROCESS 20F3C20A> (#<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54>))) 2: (METHOD NO-APPLICABLE-METHOD (T)) (#<STANDARD-GENERIC-FUNCTION CAPI-INTERNALS:INTERFACE-PROCESS 20F3C20A> &REST (#<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54>)) 3: CAPI:EXECUTE-WITH-INTERFACE (#1=#<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54> #'(LAMBDA (PANE TEXT TYPE) (LET (#) (SETF # #))) &REST (#1# "no window today" "serious")) 4: REPORT-MESSAGE-TO-WINDOW NIL 5: SPECIAL::%EVAL-NOHOOK ((REPORT-MESSAGE-TO-WINDOW "serious" "no window today")) 6: IV:PROCESS-TOP-LEVEL (DSPEC:*CURRENT-FORM* #S(LEXICAL::ENVIRONMENT :VARIABLES NIL :FUNCTIONS NIL :REMOTE-ENVIRONMENT NIL) #<function LEXICAL:EVAL-WITH-ENV 20141812> &OPTIONAL :EXECUTE) --more-- Also, CL-USER> (get-window-messages) #<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54> CL-USER> (capi:simple-pane-handle (get-window-messages)) NIL until I have visited the third pane by clicking on its tab with the mouse, then CL-USER> (get-window-messages) #<CAPI:MULTI-LINE-TEXT-INPUT-PANE RUNTIME-MESSAGES 20687D54> CL-USER> (capi:simple-pane-handle (get-window-messages)) 1379516 CL-USER> I gather from your comment that I probably do something wrong, so if you could enlighten me, I'd be very grateful. -- Eivind