CLIM mail archive


Changing the ink used for text locally and cleanly

I've been scratching my head with the manual for some time now, and I
just haven't been able to figure out any good way to do this.  Let me
be clear about what I'm trying to do.

CONTEXT: The interface in question has several screens, one of which
is in essence a large table.  Some entries in this table were
specified via user input.  Other entries were computed on the basis of
user input.  Some entries are flat contradictory.  Which entries are
in which category changes dynamically, as a consequence of user

PROBLEM: I would like to use colors to make it easy for users to distingish
which entries are which.  (Say green for things they can change, blue for
consequences, red for contradictions.)  Right now the only way they can tell
is to either remember or to click on an entry, to see if they are offered
the option of changing it, which of course is unsatisfactory.

SIMPLIFICATION: I'm not using incremental redisplay at all, just
recomputing the table after each interaction.  Fine on workstations,
painful on Macs, but good enough for right now.

COMPLICATION: The table is generated using a text-generation system
that is cleverly designed to produce either textual reports (e.g., for
students preparing homework answers) or hypertext (e.g., students
trying to figure out what went wrong).  Using a single text generator
for both purposes means I can't just rewrite everything to
CLIM:DRAW-TEXT, because I end up using FORMAT everywhere.

What I'd really like to do is something like this:

(with-ink (if (contradictory? fact) *danger-ink*
	      (if (derived? fact) *derived-ink*
  (textify <some complicated expression>))

so that any text output via FORMAT in the body of the WITH-INK has the
appropriate color, irregardless of the settings of the pane it is
being written to.  (The text generator is clever about whether material
is being output as text or hypertext already, in the latter case producing
presentations, for instance.)

If methods for how to do this are in the docs, I'd love to hear about
it because it's such an obvious capability and I can't find it.
Otherwise, has anyone written something like WITH-INK, or knows why
this is something that clim 1.1 can't be made to do easily?  Ideally,
I'd like to get this running before a demo next Monday (sigh!).

Thank you for any help/insights you can provide.


Prof. Kenneth D. Forbus
Qualitative Reasoning Group
The Institute for the Learning Sciences
Northwestern University
1890 Maple Avenue
Evanston, Illinois, 60201, USA

voice: (708) 491-7699
fax: (708) 491-5258


Main Index | Thread Index