Modules and class oddities (Was: [plt-scheme] Dialog% not accepting frame% subclasses as parent?)

From: Erich Rast (Erich.Rast at
Date: Thu Oct 17 21:03:50 EDT 2002

Am Donnerstag, 17.10.02, um 22:45 Uhr (Europe/Berlin) schrieb Matthew 

> At Thu, 17 Oct 2002 19:10:47 +0200, Erich Rast wrote:
>> Solution: I moved the parent dialog class definition in another 
>> module,
>> and made the alert module require it.
>> However, I wonder wether this is how it should work.
> Does your program use multiple namespaces?

It probably does so, but I'm not sure about it. The main program has a 
structure like this:

(require "gui-classes.scm") ; this module does (require (lib "" 
(require "alerts.scm") ; this module does also (require (lib "" 

(define dlg (instantiate wp-dialog% () (label (text untitled)) (width 
600) (height 600)))
; and so on...

> So far, the only way I can imagine the error you're seeing is if you
> have multiple instances of the `(lib "" "mred")' module. That,
> in turn, is only possible if you have multiple namespaces.

I split up gui class definitions into several modules that export 
classes like wp-dialog%.

Is that the source of the error? Is there a way to avoid it except 
putting all gui-related stuff in one module?

The program is rather large and  GUI-oriented, so I'd like to avoid 
putting all MrEd-based subclasses into one module if possible...

-- Erich

Posted on the users mailing list.