Re: Yet another MTF question.

Kurt Stirewalt ([email protected])
Wed, 14 Jun 1995 13:06:36 -0400

Sorry I didn't answer this earlier. It must've gotten buried in the
pile.

>Looked at your example in detail, and your understanding matches mine.
>
>There is no link between:
> NT_Generate_Report.Specify_second_account and the object
> NT_Generate_Report.Specify_account
>
>Might be surprising to some people, but your diagram is correct.

Yeah, I suspect that it would surprise a good number of people. This is an
example of what I think is an unorthogonal feature of the dynamic inheritance
scheme, and is likely to be a "gotcha" that we will need to warn about.

>In fact, in one of our examples, we have done exactly the same thing. The only
>problem I have is that I am not sure it is or should be legal to refer to
>value_font from label_font. How should I do that?
>
> fonts =
> value_font : MM_Font {
> font = "Times";
> style = Regular;
> size = 10 pt;
> color = Black; // assumes that Black is an object in the server.
> },
> label_font : value_font {
> style = Bold;

This is a good example. I can see why you want to do it. To do it you would
have to say:

label_font : fonts[value_font] {

and this is yet another feature that I missed in my implementation of the mtf
parser. Note that [value_font] here is an object selector, not a tag. In fact,
to add this ability to the parser, we will need to change the syntax of
tags. Could we wrap them with something other than [] ???
maybe tags could be:
|TAG|
or <|TAG|>
or (TAG)
???

This brings to mind something I've been meaning to ask you. The MTF language
is so simple in structure yet so complicated semantically that the interpreter
is quite complex. I was able to come up with a class hierarchy that helps
matters, but the software is still complex and needs good documentation to
be maintainable. I was thinking that if we could use Knuth's cweb tool on
C++ code then perhaps we could use it? I know you're not much of a LaTeX fan,
but would you have an objection to doing something like this?
Thanks.
-- kurt.