[plt-scheme] hey ! where's send super

From: Robby Findler (robby at cs.uchicago.edu)
Date: Tue Mar 2 23:25:14 EST 2004

Use `rename' to get access to the super.

  (rename [super-write write])
  (define/override (write)
    (printf "my writing\n")
    (super-write))

Robby

At Tue, 2 Mar 2004 20:18:35 -0800, briand at aracnet.com wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> 
> I just _know_ that I'm not interpreting the use of class.ss correctly.
> Probably the answer is something to do with interfaces, I'm sure :-)
> 
> Class A inherits class B
> 
> class A has a write routine which writes out thing specific to A (not
> inherited from B).
> 
> it then does send-super to write out those things which are specific
> to class B
> 
> Only it doesn't do that because:
> 
> 1.  I can't redefine the write routine without overriding it and I'm
> certainly not going to re-write the write routine to handle A & B
> because completely defeats the purpose.
> 
> 2.  there's no send-super even if I could do this.
> 
> and the write(hehe) way to do this is ?
> 
> Thanks
> 
> Brian
> 
> 
> 



Posted on the users mailing list.