[plt-scheme] mixin macro for classes?

From: Bruce Hauman (bhauman at cs.wcu.edu)
Date: Fri Jan 30 16:49:21 EST 2004

Hey everyone,

I have would to write a set mixins for the pasteboard class using the 
mixin macro.

(define snapping-pasteboard-mixin
   (mixin (?some-interface-that-doesn't-exist?)
       (rename (super-interactive-adjust-move interactive-adjust-move))
       (override interactive-adjust-move)
       (define (interactive-adjust-move snip box-x box-y)
         (super-interactive-adjust-move snip box-x box-y))))

(define snap-pasteboard% (snapping-pasteboard-mixin pasteboard%))

The key problem being that interactive-adjust-move is not in any
interface that I am aware of.

Is this possible/desirable?  Do I have to define my own interfaces for 
the pasteboard% class in order to do this?

Or should I just write a simpler version of mixin?


Posted on the users mailing list.