>This means I can use view.context to get the enclosing view? Oh, no,context
is
>something different. I thought there was a way to get at the
>enclosing container, what would solve the problem.
Yes, view.context *is* the right way to get the container
model, starting with one of the contained views:
model := view.context.ThisModel();
IF model IS FormModels.Model THEN
rd := model(FormModels.Model).NewReader(NIL);
rd.ReadView(v);
WHILE v # NIL DO
IF v is what you are interested in THEN
...
END;
rd.ReadView(v)
END
END
>Even though I can do this and thus solve my particular problem,
>how about solving that in general in the next BB release?
>Can you introduce Object names and a standard procedure
>Containers.GiveMeThatDamnName ("MyName") ?
>That would make the whole process more interactive, and less
>application-specific.
It is too heavy-weight to attach a name to every view directly. But a
container could manage names for its embedded views, that
shouldn't be difficult (although it would make Release 1.4 forms
that use non-empty names unreadable on pre-1.4 installations).
Another possibility would be name-wrappers. Wrappers are a
very general way to add state or behavior to a view, without
touching its implementation.
Cuno Pfister
Oberon microsystems, Inc.
Received on Sun Feb 21 1999 - 13:40:48 UTC