CLIM mail archive

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

Re: Slight problem with custom output records - does this sound right!



    Date: Tue, 18 Jan 1994 18:25 EST
    From: curt@eraserhead.Jpl.Nasa.Gov (Curt Eggemeyer)

Are you using CLIM 1 or CLIM 2?  I've forgotten.

    .... prior stuff removed

    > It's completely impossible for me to give you any advice without a small
    > failing test case.  The description you gave of what you are doing
    > sounds completely reasonable, so your code must just be doing something
    > wrong.  Sorry I can't be of more help.
    > 

    I found that if I stick a replay call to my output-record instance to the
    stream it was on in the map-over-output-record-elements-overlapping-region 
    method on it, IT WORKS!  Is that the "kosher" thing to do if your
    output-record has no elements or inferiors?  This is also because my record
    in the pane's top-record is generated with just add-output-record and
    replay on my instances.

It's still hard for me to tell exactly what's going on here.  One thing
you said in your last message just struck me, though:

  My output-records have presentation, output-record-mixin,
  output-record-element-mixin, and displayed-output-record-element as mixins.

Mixing in OUTPUT-RECORD-MIXIN says "objects of this class may contain
other output records", and it provides some slots and methods to support
this.  OUTPUT-RECORD-ELEMENT-MIXIN says "these objects may be contained
in other output records", and also provides some slots and methods.
Both of these mixins define some of the same methods, so it is important
that you get the ordering right.  For example,

  (defclass standard-sequence-output-record
	    (output-record-mixin output-record-element-mixin output-record)
    (...))

So one of the classes you are missing is OUTPUT-RECORD, which says "this
class is an output record".  And for all I know, your precedence
ordering may be wrong.

PRESENTATION says "objects of this class implement the presentation
protocol", but PRESENTATION provides no slots or methods.  I guess you
must provide all the right methds for this.

You also include DISPLAYED-OUTPUT-RECORD-ELEMENT (I guess you are using
CLIM 1).  This roughly means "I am the leaf of an output record tree".
So there is some dissonance here -- some of your mixins claim that the
class is a non-leaf, some claim the class is a leaf.  In fact, there are
scenarios in which you can get away with this -- an output record that
both knows how to draw itself, and has children which is also draws --
but it is a bit unusual.

    Also, another real quickie question.

    Is there anything like "draw-filled-in-rectangle-internal"?
    I could only find draw-rectangle-internal.
    Right now for speed concerns I'm doing multiple draw-line-internals for the
    height of my presentation in its replay-1 record.  BOY IS THAT STUFF FAST!

In CLIM 2, you can just use the MEDIUM-DRAW-xxx functions; the
DRAW-xxx-INTERNAL functions are just convenient internal interfaces.  In
CLIM 1, I seem to recall that the DRAW-xxx-INTERNAL are pretty much the
same as MEDIUM-DRAW-xxx in CLIM 2.  I bet that some of them take a
line-style argument, and if you pass a line-style of NIL, they will draw
a filled graphic.

[I would sure like to see what the heck it is you have been working on
for so long!]



Main Index | Thread Index