Sorry about posting twice, but it seems my previous question was disappeared.
Anyone let me know why following code doesn't work?
I got this error
> Error: value NIL is not of the expected type (MEMBER :TOP :BOTTOM :LEFT
:RIGHT).
> While executing: CENTER-WINDOW
What is this mean? If I modify like this at the nineth line from the end,
(make-instance 'window
^^^^^^^^
I don't get any error, but it can't redraw the view.
Any suggestion please?
Thanks,
Sungwoo
;-------------------
(in-package :ccl)
(require 'quickdraw)
(defclass simple-drawing-item (dialog-item) ())
(defclass simple-drawing-item-window (simple-drawing-item window) ())
(defmethod view-focus-and-draw-contents ((view simple-drawing-item)
&optional visrgn cliprgn)
(declare (ignore visrgn cliprgn))
(with-focused-view (view-container *w1*)
(view-draw-contents view)))
(defmethod view-draw-contents ((view simple-drawing-item))
(dialog-item-action view)
(call-next-method))
(defmethod dialog-item-action ((view simple-drawing-item))
; draw a sketch line
)
(defparameter *w1*
(make-instance 'simple-drawing-item-window
:window-title "SketchPad"
:view-nick-name 'sketchpad
:view-size ·@(600 400)
:color-p t
:view-subviews (list
(make-instance 'simple-drawing-item
:view-size ·@(600 400)
:view-container *w1*))))
--
<^)++<