[Prev][Next][Index][Thread]
Re: Sealed domain question
-
Subject: Re: Sealed domain question
-
From: bruce@hoult.actrix.gen.nz (Bruce Hoult)
-
Date: Tue, 20 Jul 1999 19:30:07 -0400 (EDT)
-
Organization: The Internet Group Ltd
-
References: <wk673qcg3m.fsf@ihug.co.nz>
-
Xref: grapevine.lcs.mit.edu comp.lang.dylan:10338
In article <wk673qcg3m.fsf@ihug.co.nz>, Chris Double <cnd@ihug.co.nz> wrote:
> With Harlequin Dylan I get a sealed domain error:
>
> "This method on initialize cannot be added because it is in a domain
> declared sealed in library x."
I think that this error message is probably less than clear. The
following is just IMHO, but...
You should be able to add an initialize method on <base>. What I think
the actual problem is is that your initialize method is also the most
applicable method for <derived>, and that is a no-no.
Try making an initialize(<derived>) method in the library and I think that
should fix it.
The *interesting* thing is what happens if that initialize(<derived>)
method calls next-method()? Will it use the method on <object>, or will
it use the method on <base> that you added in another library. I think it
should always use the one on <base> -- since the comiler knows that domain
is open it shouldn't prematurely optomise the call to next-method().
-- Bruce
References: