I got stuck figuring out how to reference models. The problem is that a reference to a Model by a Client needs to be one of three types:
./
is working-directory-relative --
but Christopher rightly pointed out that this is
bogus.
Here is what I came up with:
The idea here is to effectively cache
the path to a model's File (as in disk file, not
the Tycho File class, which is actually a widget),
and reference is by both the working directory and
the relative path. Notes on the model:
If ModelRegistry finds a matching file, it creates a ModelProxy object that knows where that file is. (In the implementation, the proxy is just some data in the ModelRegistry class -- the diagram is conceptual only.) A unique id is returned to the client.
(A Client, by the way, could be another Model. I should perhaps have shown Model inheriting from Client to capture this role.)
../icons/sources.tim
), moving files
and directories around should be fairly robust.
JohnR, 14 Nov 97