[DGD] preserving vars after lib recompile

Petter Nyström jimorie at gmail.com
Wed Sep 17 16:03:51 CEST 2008


The below is all from my quite possibly fogged view of how DGD works.

On Wed, Sep 17, 2008 at 2:46 PM, chris . <psych_mayo at hotmail.com> wrote:

> I thought that if a library had data in it, and an object inherits it, that when i change the lib, the object will have to be destructed and cloned fresh.

No, it doesn't. If you want to recompile the object to use the changed
lib, what you need to do is to first destruct the lib and then
recompile the object. Recompiling the object will automatically
compile the inherited files needed. Unless there is a change of
variable declarations in the lib, no data will be lost in the
recompiled object. All data that belonged to the lib object is however
lost when you destruct it - so don't keep data in library objects.

> When i change a lib, I would recompile that lib, and all libs that inherit that lib.  After the lib compilations, I would recompile the master object, which would in turn automatically upgrade all the clones of that object.  All the clones would now be using the current libs.

Rather, I would destruct the lib and all libs that inherit that lib.
Then I would recompile *all* master objects that inherit any of the
destructed libs - this in order to make sure all objects around use
the updated lib. But that is not mandatory, DGD allows having multiple
objects inheriting different versions of the same lib.

> I am using the klib, if that is a factor in the above statement.

I don't know. =)

Regards,

Petter



More information about the DGD mailing list