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

HopObject.addAt()

Adds a HopObject as subnode to a HopObject at a certain position.

Syntax
HopObject.addAt(Number, HopObject)

Unlike add() the position of the subnode is determined by the number argument in the function call.

Using this function usually only has an effect with the embedded database, since the order of objects stored in a relational database depends on the value of some table column. Thus, when adding objects stored in a relational database, one may as well use add().

Example
res.write(root.get(23));
null

var myStory= new story();
root.addAt(23, myStory);
res.write(root.get(23));
HopObject story


... comment


Page last modified on 2002-07-16 13:08 by tobi