Views

So far, we have no way to easily create or display an initial environment, and no way to display results (supposing that we undo the simple result display). We will accomplish these tasks by adding stnodes to the tool network. We modify the interpreter tool creation function to include appropriate encapsulations in the tool network:


(de :create (ctview)
    (lets ((ctedit (send 'object ctview))
           (tool (:tool:create ctedit))
           (network (ty-tool-create-std-network tool
                                                'Exp-interpreter 
                                                ':callback))
           )
       ;;Add Exp specific stnodes.
       (:create-initial-view-spy tool network)
       (:create-result-view-spy tool network)
       ;;Graphic interface.
       (:create-decoration ctview network)
       ))

There is a subtle point which we must consider. The trees that will be displayed by the initial and result environment views belong to the Exp formalism. If we are not careful, when we open a view on an environment tree, the Exp environment will be applied to the view (e.g., the popup menu will be available) as for any Exp source program. Thus, environment views must be opened without loading the standard Exp environment.



Tutorial