added getPrototype (string)

This commit is contained in:
stefanp 2002-12-02 12:18:15 +00:00
parent 4505fb1ffc
commit e34e5a0ee3

View file

@ -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) {