[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Lazy Presentation Types? (was CLIM info)



    Date: 8 Feb 90 07:30:19 GMT
    From: raymond@ptolemy.arc.nasa.gov (Eric A. Raymond)

    Does CLIM have any capability for "lazy" presentation types?

A presentation type is effectively a CLOS class.  So the flip answer to
your question is "no".  However, I think you meant to ask "Does CLIM
have any capability for "lazy" presentations?"  The answer to that
question is "yes"; in fact, Dynamic Windows supports this as well (the
bitmap editor uses this feature).

    What I mean by lazy is that there is no effective presentation type

"no effective presentation"

    until some event occurs.  For instance if I click my mouse in the
    editor, the presentation types for character, word, s-expr, line,

"the presentations for"

    etc. become active (within some local scope).  Whether or not they
    cache this type is up for argument.

    The point here is that you don't have tons of presentations to clutter
    up the system and that they are created in response to some event.
    This could be extended to allow promotion of the type (i.e., from char
    to word to s-expr) in response to additional events (i.e., dragging, a
    second click, etc.)

    Is my intuition that this approach would be inexpensive correct?

It depends on the specific application as to whether this is expensive
or not.  For example, re-deriving an "s-expr" from a "word" from a
"char" could well be more expensive than just presenting the thing as an
"s-expr" in the first place.  On the other hand, in a VLSI ECAD program
where there are a zillion little rectangles, it is almost certainly less
expensive to derive the presentation directly from the applications
geometric datastructures (presumably a quad-tree or something).  CLIM
supports this via its "history protocol".