CLIM mail archive

[Prev][Next][Index][Thread]

"Roll-your-own" Pane Types



In Symbolics CLIM 1.0, I would like to create pane instances of

(pcl:define-class COMMAND-PANE-CLASS
		  (clim::sheet-window-stream)
     ((command-list 	:initform () :documentation "list of cmd-definition structures")
      (enabled-style 	:initform '(:sans-serif :bold :large)
      			:documentation "enabled character style")
      (disabled-style 	:initform '(:sans-serif :roman :normal)
			:documentation "disabled character style"))
  (:accessor-prefix cmd-pane-)
  (:initargs :slot-names)
  (:documentation "Command pane class for enabled/disabled command fonts"))

(defmethod DISPLAY-COMMAND-PANE ((frame-object application-frame) (self COMMAND-PANE-CLASS))
  ...)

so I define it as a pane type --

(defmethod CLIM::PANE-TYPE-OPTIONS ((type (eql 'COMMAND-PANE-CLASS)))
  '(:default-text-style (:sans-serif :bold :large)
    :incremental-redisplay nil
    :display-function display-command-pane
    :display-after-commands nil
    :scroll-bars nil))

then --

(define-application-frame AUTOCLASS-RESULTS-FRAME
			  ()		; No super classes
  ((global-pane :initform nil :accessor global-pane)
   (global-header-pane :initform nil :accessor global-header-pane)
   (banner-pane :initform nil :accessor banner-pane)
   (command-pane :initform nil :accessor command-pane))

  (:panes
    ( ...
     (command command-pane-class)))
  ...)

but when I try to bring this up -->

1Error: No applicable method for #<CLOS:STANDARD-GENERIC-FUNCTION DISPLAY-COMMAND-PANE 216445356> with arguments 
0       1(#<AC-UI::AUTOCLASS-RESULTS-FRAME 46610725> #<CLIM::SHEET-WINDOW-STREAM /x 0:744 y 53:90/ 46615175>)

0The following specials have been rebound; use 2:Show Standard Value Warnings0 for details:
  *PRINT-CIRCLE* and *PACKAGE*

1CLIM::CALL-DISPLAY-FUNCTION
0   Arg 0 (CLIM::DISPLAY-FUNCTION): DISPLAY-COMMAND-PANE
   Arg 1 (CLIM::FRAME): #<AC-UI::AUTOCLASS-RESULTS-FRAME 46610725>
   Arg 2 (CLIM::PANE): #<CLIM::SHEET-WINDOW-STREAM /x 0:744 y 53:90/ 46615175>
   Rest arg (CLIM::ARGS): NIL

because the (CLIM::PANE) is not my type: 'COMMAND-PANE-CLASS.  I want to
do it this way to "attach" instance variables and methods to my pane types.
Is there a different approach to doing this?


==> Will Taylor		taylor@charon.arc.nasa.gov

0,,

Follow-Ups:

Main Index | Thread Index