Then I try to modify this node, but find it's just a copy.
Code: Select all
;; @syntax (Graph:get-node node-name)
;; @description
;; <p>If you want to get a Node out of the Graph (e.g. in order to extract
;; its properties), then use the following function to get it by name.</p>
;; @example
;; (println (:get-node my-dag "G")) ;;=> (Node "G" sad)
;; (println (:get-node my-dag "Does not exist")) ;;=> nil
(define (Graph:get-node node-name)
(and (find (list 'Node node-name '*)
(:nodes (self))
match)
$0))
Code: Select all
(setq product-node (:get-node my-dag "result"))
(push "2014-12-12 10:10" product-node -1)
(println product-node)
(println (:get-node my-dag "result"))
(Node "result" "2014-12-12 10:10")
(Node "result")
I have no idea about returning a reference of Node object from Graph method.