Helma logo
helma.org » Home > Stories > HopObject.setParent()

HopObject.setParent()

Assigns a HopObject as parent to a subnode.

Syntax
HopObject.setParent(HopObject)

Sometimes it is necessary to set a subnode's parent to a certain HopObject. This is caused by the way Helma is caching subnodes.

This is the case, e.g. when you are retrieving a subnode from a relational database through different ways (e.g. by using subnode relations) and you want to remove this subnode or apply the href() function on it.

Example
var trash = user.stories.get(23);
trash.setParent(root);
root.remove(trash);


... comment


Page last modified on 2002-07-10 08:46 by tobi

 
stefanp, Monday, 15. March 2004, 16:08
this function is obsolete in helma 1.3!

... link  


... comment