[plt-scheme] graph-pasteboard

From: nik gaffney (nik at fo.am)
Date: Mon Sep 11 06:52:21 EDT 2006


while using the graph-pasteboard, it looks like the on-delete method in the
graph-pasteboard-mixin should handle the removal of nodes from a graph, as
well as deleting the snip from the clipboard.

perhaps ->

(define/augment (on-delete snip)
  ;; remove from parent list of children
  (for-each (lambda (child)
              (send child remove-parent snip))
            (send snip get-children))
  ;; remove from child list of parents
  (for-each (lambda (parent)
              (send parent remove-child snip))
            (send snip get-parents)))

is there a reason why this would only be done in an class using the mixin,
rather than by default?


Posted on the users mailing list.