[DGD] Object recompiled when objectd calls compile()?

Noah Lee Gibbs angelbob at monkeyspeak.com
Sat Feb 16 08:44:39 CET 2002


  Hi.  I'm having an odd problem with my objectd, and I'm hoping one of
you folks will have an idea how to solve it...

  My objectd will call an upgraded() method on an object being recompiled
if one exists.  That's all well and good.

  However, if it's a recompile (which is when it'll call that method) it
gets the old version of the method.  I spent a lot of time trying to
figure this out before slapping my forehead with the classic "Oh!".

  Clones (and apparently non-clone instances) of the object don't get
upgraded 'til the end of the current thread.  So if you take the object
passed to your objectd's "compile" call and call a method (such as
"obj->upgraded()") you get the old version.  At least, that's been my
repeated experience with 1.2.35.

  Kinda odd.  But okay.

  Short of having a call_out to call upgraded, does anybody here know a
good way to have an upgraded() method call the new version of the function
instead of the old one?  I've been recompiling twice when I care about the
contents of the upgraded function as a workaround, but it gets tedious...

 -- 
angelbob at monkeyspeak.com
See my page of DGD documentation at
"http://www.angelbob.com/projects/DGD_Page.html"
If you post to the DGD list, you may see yourself there!

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list