MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

RE: [SERVER] chparent()



This would definitely be a Bad Thing(tm).  For onw, chparenting an object 
has nothing to do with initializing it.  If you recycle an object, for instance, all
the children of that object are chparented to the parent of the recycled
object.  If they were initialized every time that happened, half of the variables 
would be erased.  The initialize() verb is particularly useful for presetting
properties to fixed values when an object is created.  If you create an object
whos initialize verb call resets name to "You see a thing that has no description",
then if you recycle a parent object somewhere in the heirarchy, all the children
of that type will suddenly lose their descriptions.  not a good thing.

If you chparent an object to another object in the same parent chain, then all
the properties that exist on both remain intact as they were.  if you chparent an
object off of that parent chain, then all the properties become cleared, but in
neither of these cases should the initialize verb be called, because it can do
totally arbitrary things which could have severe side-effects.


----------
From:  Ranalou[SMTP:ranalou@stoopid.res.wpi.edu]
Sent:  Wednesday, March 20, 1996 12:14 PM
To:  moo-cows@parc.xerox.com
Subject:  [SERVER] chparent()

I know that it is so with create(), but when a chparent() is done, does 
the :initialize() verb on the changed object get called?  If not, why?  
And, if there is no reason why this would be a bad thing, I'd like to add 
it to the wish-list for future servers...

--
+ That Silly Ranalou Guy, ranalou@stoopid.res.wpi.edu
+ Ranalou on CowsGoMOO, stoopid.res.wpi.edu 1234  <--- Official Blatant Plug!
+ 
+ Do not taunt the Happy Fun Ball.







Home | Subject Index | Thread Index