[mcclim-devel] map-over-output-records-overlapping-region

Andy Hefner ahefner at gmail.com
Sat Apr 2 22:02:08 UTC 2011


On Thu, Jan 6, 2011 at 4:51 PM, Orm Finnendahl
<o.finnendahl at inm.mh-freiburg.de> wrote:
> Hi,
>
>  reading the specs, map-over-output-records-overlapping-region should
> map over *all* childs of the supplied output-record which overlap the
> supplied region. In my application, the output-records are
> hierarchical with the topmost output-record covering the whole drawing
> area and its childs occupying parts of that and their childs again
> parts of the parts and so forth.
>
> When calling the function on a part of the drawing area, the macro
> only maps the function over the topmost output record and ignores all
> of its childs which also overlap the region in question.
>
> I could write a similar macro which traverses the tree and checks for
> overlap but I ask myself, whether the behaviour of mcclim's built-in
> macro is correct with regards to the specs or whether I'm doing
> something wrong here...

I think it's pretty clear it shouldn't recurse on it's own. If it did,
it'd be necessary to invent another more primitive function which did
not. Further, this appears to be the behavior implemented by other
CLIM implementations.

map-over-output-records-containing-region is arguably the fundamental
operator for querying the output history. As the Franz CLIM User's
Guide astutely notes, output-record-children may be forced to cons a
new list of children (undesirable..), depending whether the output
record stores this them a list or some other structure, e.g. an
R-tree.

Manually recursing shouldn't be much trouble - write the continuation
inside LABELS, add one recursive call to map-over-output-records-etc.




More information about the mcclim-devel mailing list