From 697f3a110cadf71b89b4412eff402340fc84ba00 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 24 Jan 2001 14:58:14 +0000 Subject: [PATCH] fixed bug where no constructor was created for prototypes that where created after the application has started --- src/helma/framework/core/TypeManager.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/helma/framework/core/TypeManager.java b/src/helma/framework/core/TypeManager.java index c312b95d..b6d40c83 100644 --- a/src/helma/framework/core/TypeManager.java +++ b/src/helma/framework/core/TypeManager.java @@ -194,6 +194,19 @@ public class TypeManager implements Runnable { proto.templates = ntemp; proto.functions = nfunc; proto.actions = nact; + + // register constructor for evaluators that are already initialized. + if (!"global".equalsIgnoreCase (name)) { + Iterator evals = getRegisteredRequestEvaluators (); + while (evals.hasNext ()) { + try { + RequestEvaluator reval = (RequestEvaluator) evals.next (); + FunctionPrototype fp = (FunctionPrototype) reval.evaluator.getFunctionPrototype(); + reval.global.putHiddenProperty (name, new NodeConstructor (name, fp, reval)); + } catch (Exception ignore) {} + } + } + }