[DGD] Inherits.

Erwin Harte harte at xs4all.nl
Thu Mar 21 05:44:45 CET 2002


On Thu, Mar 21, 2002 at 04:19:09AM +0100, Vladimir I. Lazarenko wrote:
> Hello DGD,
> 
>   Hmm. I'm a bit puzzled here. Let's say I'm making changes to a
>   files, that is inherited to some kind of other file. If i try to
>   update inherit itself, it says that i can't update inherited file.

Right.

>   If i dest the object that inherits that file, update the inherit and
>   clone object back, my changes do not work.

If you destructed and compiled both objetcts (in the right order) it
should now be effective for new clones, at least.  However

>   Tha only possible way of gettting changes up to date is rebooting
>   the driver. Doesn't feel good to me.

Not really, no.  Ideally you want to be able to upgrade even the
lowest level objects like the auto and driver object and have those
changes effective in all others, and that _is_ possible if you stick
to the rules that for instance the kernel-lib suggests to you:

  * Keep inheritables and clonables separated.
  * Do not destruct an object for which clones still exist.

>   I can feel that I don't know something yet. What? :)

I assume you have something like this:

  * Some useful inheritable object:   /lib/utility.c
  * The actual object you're cloning: /obj/clonable.c

Now, to make changes effective in new and already existing clones, you
would:

  * destruct /lib/utility
  * compile /lib/utility.c
  * compile /obj/clonable.c

That last one will actually _recompile_ /obj/clonable.c, i.e. replace
the existing code for /obj/clonable.c while not keeping the same spot
in the object-table, so all clones now point to the new code.

Hope that helps,

Erwin.
-- 
Erwin Harte <harte at xs4all.nl>
_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list