[plt-scheme] (define pb-snips (map (λ (snip) (send snip copy)) graph-snips))

From: Stephen De Gabrielle (spdegabrielle at gmail.com)
Date: Thu Jun 21 05:26:08 EDT 2007


I've been trying to copy snips,(editor-snip and image-snip using graph-snip
from the MrLib Graph library )

Copying the snips seems fine;
(define pb-snips (map (λ (snip) (send snip copy)) graph-snips))

until I try to use one of my own methods

  (define my-image-graph-snip%
    (class (graph-snip-mixin image-snip%)
      (define/override (resize x y) #f) ;; do not allow resizing

The copy operation doesn't bring the overridden method along.

I have since discovered that the copy operation needs to be overridden for
my snip too, but I am not sure how to - any hints as to how I should
approach this?



Stephen De Gabrielle
s.degabrielle at ucl.ac.uk
Telephone +44 (0)20 7679 5242 (x45242)
Mobile                  079 851 890 45
University College London Interaction Centre
Remax House - 31/32 Alfred Place
London - WC1E 7DP
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070621/072142cc/attachment.html>

Posted on the users mailing list.