home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!cambridge.apple.com!bill@cambridge.apple.com
- From: bill@cambridge.apple.com (Bill St. Clair)
- Newsgroups: comp.lang.lisp.mcl
- Subject: Re: table-dialog-item
- Message-ID: <9208281526.AA08762@cambridge.apple.com>
- Date: 28 Aug 92 16:33:02 GMT
- Sender: info-mcl-request@cambridge.apple.com
- Lines: 35
- Approved: comp.lang.lisp.mcl@Cambridge.Apple.C0M
- Full-Name: Bill St. Clair
- Original-To: berger@SOE.Berkeley.Edu (Daniel Berger)
- Original-Cc: info-mcl
-
- >Here is a pretty silly question -
- >
- >Is there a programable way to set the contents of a (single) cell of a
- >table-dialog-item or a sequence-dialog-item? I do not want to set the
- >contents of the entire sequence (i.e., with set-table-sequence - I'd like
- >something like "set-cell-content"), as I do not know what the content is.
- >(I may be reading the content in from a file, and would like to create
- >the table first and fill the content as I go along).
- >
- >Am I missing something obvious?
-
- A table-dialog-item has no concept of "setting the contents of a cell".
- The contents is returned by the CELL-CONTENTS generic function, which
- is called by the default DRAW-CELL-CONTENTS method. If you specialize
- CELL-CONTENTS, you can compute the value every time rather than storing
- it in a data structure. If you specialize DRAW-CELL-CONTENTS, you can
- prevent the consing done to convert the CELL-CONTENTS value into a
- string.
-
- SEQUENCE-DIALOG-ITEM specializes CELL-CONTENTS to return an element
- of a sequence. To change the value of a single cell, you change the
- value of the corresponding element of the sequence and call REDRAW-CELL.
- The function BM-DO-DIALOG-FILE-SEARCH in the file
- "ccl:examples;boyer-moore.lisp" illustrates this. It also shows that when
- the length of the sequence changes, you need to call SET-TABLE-SEQUENCE.
-
- If you make your own class of TABLE-DIALOG-ITEM and specialize
- CELL-CONTENTS or DRAW-CELL-CONTENTS, then when the value of a cell changes,
- you can simply call REDRAW-CELL on that cell. If the size of your table
- changes, you'll need to call SET-TABLE-DIMENSIONS, which will cause a redraw
- of the entire table. If you want to prevent this redrawing, it should be
- possible, but I haven't tried it yet. Ask me for more help if you really
- want to do this, or look at:
-
- "MCL 2.0 CD:Additional MCL Source Code:lib:dialogs.lisp"
-