[plt-scheme] frame:editor problem

From: Robert Bruce Findler (robby at cs.uchicago.edu)
Date: Thu Jan 16 15:37:03 EST 2003

The framework was using `make-object' instead of `instantiate' to
create an instance of mycanvas%. Now that it uses `instantiate', your
code works properly.

Robby

At Thu, 16 Jan 2003 14:45:39 -0500, "Mike T. Machenry" wrote:
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> 
> Hello, I am having a problem deriving a frame:editor%. When I give it a
> canvas that has any init or init-field of it's own. I can see that this
> would cause a problem if there was no default value, but this init
> has a default value. Further the error message says that the parent
> argument (required by editor-canvas%) is not satisfied. Does anyone know
> what I'm doing wrong?
> 
> -mike
> 
> (require (lib "framework.ss" "framework"))
> 
> (define mycanvas%
>   (class editor-canvas%
>     (init (foo #f))
>     (super-instantiate ())))
> 
> (define myframe%
>   (class frame:editor% ()
>     (define/override (get-canvas%)
>       mycanvas%)
>     (define/override (get-editor%)
>       pasteboard%)
>     (super-instantiate ())))
> 
> (instantiate myframe% ())



Posted on the users mailing list.