CLIM mail archive
[Prev][Next][Index][Thread]
with-output-as-presentation
CLIM2.0 Allegro4.2
We have the following problem
When using with-output-as-presentation combined with STANDARD-SEQUENCE-OUTPUT-HISTORY
or R-TREE-OUTPUT-HISTORY the program runs into an error.
Error: No methods applicable for generic function
#<STANDARD-GENERIC-FUNCTION CLIM:PANE-VIEWPORT @ #xb4b1de> with args
(NIL) of classes (NULL)
[condition type: PROGRAM-ERROR]
Rainer
------------------------short example ------------------------------------
(in-package clim-user)
(clim::define-application-frame test ()
()
(:panes (card-pane :application
:display-after-commands nil
:display-function 'draw-map)
)
(:layouts (default (vertically ()
(:fill card-pane)
)))
)
(define-presentation-type section ())
(defun present-section-as-line (section stream x1 y1 x2 y2 color)
(with-output-as-presentation
(stream section 'section)
(draw-line* stream x1 y1 x2 y2 :ink color)))
(defmethod draw-map ((test test) stream)
(present-section-as-line "line-1" stream 12 12 23 23 +black+)
(present-section-as-line "line-2" stream 23 23 16 16 +red+))
(defvar *test* nil)
(defvar *test-root* nil)
(defun my-test (&optional (host "cortez"))
(setq *test-root* (find-graft))
(unless *test*
(setf *test* (make-application-frame 'test
:parent *test-root*
:width 100
:height 100)))
(setf (stream-output-history
(get-frame-pane *test* 'card-pane))
; (make-instance 'clim::r-tree-output-history)
(make-instance 'clim::STANDARD-SEQUENCE-OUTPUT-HISTORY)
)
#+allegro
(mp:process-run-function "proroad" #'clim:run-frame-top-level *test*)
)
(clim-user::my-test)
--------------------------------end------------------------------------
--
------------------------------------------------------------------
Rainer Koenig
Information Science Research Center at the University of Karlsruhe
Technical Expert Systems and Robotic phone: +49-721-9654-744
Haid-und-Neu-Str. 10-14 fax: +49-721-9654-709
D 76131 Karlsruhe (Germany) e-mail: rkoenig@fzi.de
------------------------------------------------------------------
Follow-Ups:
Main Index |
Thread Index