Hello again, I have a more concrete problem here. The following class extends the image-snip% with a float (size), and overrides the methods copy and write as supposed.
(define extend-snip% (class image-snip% (init-field [size 20.0]) (super-new) (define/override (copy) (new circle-snip% [size size])) (define/override (write f) (send f put size)))) But when I create an object of this class, for example: > (make-object extend-snip% 30 "~/Documents/img.png") I expected to see the bitmap here (wrapped in this class) However, it throws the following error: draw-rectangle: contract violation expected: (not/c negative?) given: -2.0 ... Someone can give me a more useful explanation? Thanks. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.