[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: naha@RIVERSIDE.SCRC.Symbolics.COM
- Subject: Re: view-draw-contents
- From: "Mark A. Tapia" <email@example.com>
- Date: Thu, 30 Apr 1992 18:42:42 -0400
- Cc: firstname.lastname@example.org
Mark Nahabedian <naha@RIVERSIDE.SCRC.Symbolics.COM> writes:
> I'm trying to produce a formatted table in a window.
> The cells specialize VIEW-DRAW-CONTENTS
> based on the kind of information displayed in them. A typical example
> would be
> (defmethod view-draw-contents ((view numeric-cell))
> (format view "~d" (cell-value view)))
You need to use the draw-cell-contents method:
draw-cell-contents (item table-dialog-item) h &optional v
"The default draw-cell-contents shows the printed representation
of the cell contents (using the table-print-function which
defaults to princ..."
Since you aren't drawing graphics in the cell and are only
using format, you don't really need to table-print-function.
You can specify it as part of the table initialization
:table-print-function #'(lambda (cell-contents stream)
(princ (format t "~d" cell-contents) stream))
You'll need to specify the table-dimensions of the table
(set-table-dimensions (item table-dialog-item) h &v)
otherwise nothing may be displayed.