From e34e5a0ee377cae716b4d98f8b5af9424c43e2c8 Mon Sep 17 00:00:00 2001 From: stefanp Date: Mon, 2 Dec 2002 12:18:15 +0000 Subject: [PATCH] added getPrototype (string) --- DocApplication/functions.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/DocApplication/functions.js b/DocApplication/functions.js index 3de8ba86..88908e71 100644 --- a/DocApplication/functions.js +++ b/DocApplication/functions.js @@ -1,5 +1,7 @@ - +/** + * get the prototype of any doc-object (either a prototype, a function or a tag) + */ function getDocPrototype (obj) { var tmp = obj; while (tmp!=null && tmp.getType () != this.PROTOTYPE) { @@ -8,6 +10,15 @@ function getDocPrototype (obj) { return tmp; } + +/** + * get a prototype of this docapplication, ie get on of the children of this object + */ +function getPrototype (name) { + return this.getChildElement ("prototype_" + name); +} + + function getDir (dir, obj) { dir.mkdir (); if (obj.getType () == this.APPLICATION) {