On Wed, 17 Mar 1999, Jean-Marc Lasgouttes wrote:

> >>>>> "Asger" == Asger K Alstrup Nielsen <[EMAIL PROTECTED]> writes:
> 
> >> It seems to me that currently the include inset needs to know about
> >> its parent to work correctly. To make this change, we'd have to
> >> pass extra information in some cases.
> 
> Asger> Yes, this is needed, but this is a different situation:
> 
> Asger> We are talking about two different kinds of ownership:
> 
> Asger> 1. Which Buffer does an inset belong to?

Most of these situations only require a Communicator to ask questions of
or push answers through (maybe Liason would have been a better name for
that class or even Oracle or Guru).

> Asger> 2. Which Buffer does this included Buffer belong to?
> 
> Asger> I'm talking about eliminating the explicit management of type 1
> Asger> ownerships: Insets do not need to know who owns them.

That's right.  All they need to know is who to ask questions of and who to
provide info to (in the case of insets with Popups).  Or better yet
eliminate that need completely.

> Another example is the quote inset: it uses information from the
> buffer (encoding, language) to determine the LaTeX output.

In this case the inset should probably be making use of a Communicator and
not a Buffer.  It only needs to ask specific questions and it doesn't need
to be manipulating buffer contents.  Of course we could get the calling
code (probably a Writer) to pass the appropriate info but then its got to
know what type of Inset its talking to meaning we'd need some sort of
multiple-dispatch for Writers.

Allan. (ARRae)

Reply via email to