Displaying results simply

Let's sum up where we are: We can now trigger evaluation -with or without an initial environment- from a button in the Exp popup menu. A message display window will open automatically for all warning messages sent by the interpreter. However, we have done nothing to display either the initial environment or the results. In a simple version of the environment, we merely want to display the result environment computed by Typol. To do so, we make use of the function ty-result-network. This function adds stnodes to a Typol tool network so that a view opens automatically for a specified result.


(de :create (ctview)
    (lets ((ctedit (send 'object ctview))
           (tool (:tool:create ctedit))
           (network (ty-tool-create-std-network tool
                                                'Exp-interpreter 
                                                ':callback))
           )
       ;;Handle results
       (:create-result-view-spy tool network)
       (:create-decoration ctview network)
       ))

(de :create-result-view-spy (tool network)
    (ty-result-network network tool '|env$| "Result view env'")
    (ty-result-network network tool '|env$$| "Result view env''")
    )

The third argument of ty-result-network is the name of the result to listen for, as named in the exported Typol clause. Since we export two clauses, we plan for two different views to open. These views reopen automatically if killed.


Tutorial