[Setools] [OB] Access to browser in node instances?

Colin Putney cputney at wiresong.ca
Tue Dec 5 04:58:18 UTC 2006




On Dec 4, 2006, at 2:49 AM, David Röthlisberger wrote:


> I'm creating a browser which gets the entities passed for which I'm
> building the nodes afterwards. There is no static point to access  
> these
> entities, they are dependent on a specific instance of the browser and
> may change during the lifetime of this browser.
> I can now pass these entities from the browser to the environment  
> node to the class category node to the class node, and so on. But  
> if the
> entities change in the browser instance I cannot access these  
> changes in
> the node classes.
> I would like to be able to get the entities in the nodes directly from
> the browser instance or, another possibility, from the root node (ie.
> environment node) of the browser.
> For that I would need either a reference to the browser instance or to
> its root instance in every node.
> Are there good reasons why such a reference does not exist, or can my
> problem be solved with a much better approach?
>

Hi David,

What sort of entities are you talking about? Why do you need to get  
at them from the nodes?

There *is* a good reason not to have references to the browser inside  
the nodes. An early version of OB was designed that way, and it led  
to too much coupling and inflexibility. Taking them out simplified  
things quite a bit, and ever since then, nodes have been becoming  
simpler and simpler. Nodes really should be simple adaptors for  
domain objects, adapting them to the protocol that OB expects.

There's probably a better way to accomplish what you want; can you  
supply more details?

Colin




More information about the Setools mailing list